TRIM requires support on all three points, from the OS to the drive controller to the drives firmware. The OS needs to understand the TRIM draft standard, the firmware on SSD needs to pass the TRIM commands and between them, the drive controller has to passthrough the TRIM commands.
Apple knows and validate every SSDs that are sold as BTOs in their Macs, so they can feel safe about supporting the TRIM between the OS/controller and the SSD without any issues.
Windows has genetic TRIM drivers for most of the popular drive controllers and support any SSDs with TRIM support but Microsoft cant validate all of the SSDs, it is up to the manufacturers to provide the firmware updates to fix any issues with TRIM.
You may have heard that many SSDs have to be flashed a couple of times to fix any issues. SSDs are still famous for firmware issues but theyre getting much better over time.
Eventually over time, TRIM will become an official standard (maybe on its own) and Apple can safely enable it for all incoming new SSDs but I doubt theyll enable that support any time soon.