I dunno
https://www.crucial.com/articles/about-ssd/what-is-trim
"Trim also affects the longevity of the solid state drive. If data is written and erased from the same NAND cells all the time, those cells will lose integrity. For optimum life, each cell should be utilized at roughly the same rate as other cells. This is called wear leveling. The Trim command tells the SSD which cells can be erased during idle time, which also allows the drive to organize the remaining data-filled cells and the empty cells to write to to avoid unnecessary erasing and rewriting. "
So looks like trim in conjunction with garbage collection and then the drives own software ?
Basically TRIM is just a way for the OS to tell the SSD which cell can be safely reclaimed. It's mostly used when files are deleted, as there's no way for the SSD controller to know which sectors are occupied by these deleted files.