You did not say, do you already have a Win10PE(SE) project / bulid ?
After the basics you need to add (integrate) specific drivers.
For example network card, sata controller if they are not recognized (installed).
Same story is with NVMe PCIe SSD, some work via a generic M$ driver and some have his own (for ex. Intel, Samsung, ...).
Only after mentioned and when you have access to SSD, HDD, files in general come the "wishes".
By this comparison >
https://www.iobit.com/en/compare/sd/IOBit Smart Defrag is not something special, it has a lot of better tools of that kind (especially in the free version).
Generally, in the W10 TRIM should be turned on by default for SSD.
Here's an example of how to run it using Power Shell >
https://winaero.com/blog/trim-ssd-windows-10/Also do not forget that with TRIM an garbage collection is important as well.