NTFS file system usually does not need defragmentation. Even more - do not defrag SSD drives nevertheless what any flashing ads or "experts" are saying. You will only shorten your SSD life with that.
Also it is not possible to defragment Windows system drive while Windows is working.
If you still want to defragment your system drive (HDD drives only!), you must do that during boot time. Boot into recovery mode and run
defrag command from console. Or schedule boot time defragmentation by utility like IObit Smart Defrag or Defraggler. More details under link below.
https://superuser.com/questions/1222344/running-windows-disk-defragmentation-on-boot-in-windows-10
This is incorrect and bad advice for pretty much every point you tried to make...dont offer advice if you don't 100% know what you are talking about... you can lead someone to royally screwing stuff up......ANYWAYS..
NTFS 100% does indeed fragment... its just harder for it to become fragmented as quickly as tradtional hdd drives and flash based drives because ssd's contain an on-device buffer or cache.. most are SLC cache but there is also QLC (the better of the two). Anyways what this cache does is it in lamens terms acts a sort of temp memory that stores info waiting to be read or written to the ssd... this helps prevent data being written to wrong sectors due to things like multiple parallel operations running at once or many write/deletes in a short time frame, etc...HOWEVER... over time the data on the ssd still can become fragmented... the worst i have seen was a corsair mp600 2tb nvme ssd i had... i swapped it out and just utilized it in a external nvme enclosure to act as a form of fast, portable storage... as a result it was used sporadically and wasn't checked or had any forms of error checking done for a year or so..
When i ran the error check and defrag porgram in windows, it showed as 11% fragmented...
AND NO... DEFRAGGING WILL NOT RUIN YOUR SSD! WINDOWS DOESNT ACTUALLY DEFRAG SSD'S (despite the confusing nature of the defragging program and language used... When you click defrag, what windows ACTUAL::Y DOES is set up whats called trimming... trimming is essentially defrag for ssd's... on first setup, windows anaylzes the ssd to find fragmentation... then windows pulls the fragmented data and copies it to memory..then it re-arranges the fragmented data and replaces that data to where it should exist on the ssd.
Once thats done, the trim process should be quick and seemless.. I set windows up to trim all my drives connected one a week. The actual trim process, once fully setup, just essentially cuts out any data that's "masking" what it actually is... for example say a file has a bunch of 0's written before the actual data appears... this can cause your drive to treat the file as being larger than it actually is, and can cause gradual performance degredation and fragmentation of data... trimming quickly deletes out those "0's" to quickly restore data to its proper form....
Hope that helps... if you are still having issues, you may have some partition table issues and boot sector issues on the affected drive. At that point, you would need to completely wipe the drive, delete any and all partition tables and volumes and run a clean disk operation (obviously backup data first to a safe location as your drive will lose everything and it wont be recoverable..
Then, reinstall your chosen operating system totally fresh on the freshly cleaned disk. Then move your backed up data back to your new drive and new OS.
When doing this, don't backup any sort of boot files and data, system recovery partitions or any system files from the old os install... doing so has a high chance of messing up your OS system files and corrupting your entire OS (i have had this happen to me before... I accidently restored a folder that contained some system level drivers and data that conflicted with the new install... i was stuck in a bootloop and had to start the process all over again..
Just backup your program files and user files and such.. I usually backup my documents, downloads, program files (x86) and my user folder under C:/Users/YourUserName
Doing all the above should get your drive working properly again 9 times out of 10... if not, check to see if your ssd company has published a new firmware for your ssd (firmware is diff than driver.. and be careful updating or messing around with ssd firmware...many times if you buggle this up you will brick your ssd..
Not all ssd's have firmware though.. best to just go to your ssd companies webpage and download their ssd tool..for example curcial has exectuive suite...samsung has samsung magician.... corsair has corsair toolbox...etc...
The same program should also be able to update or reinstall the proper drivers for your ssd as well....
Also check to make sure windows ins't using an incorrect driver for your ssd... this happens a ton.... most times windows default storage controller driver works just fine.... but often times, if you install a driver direct from the ssd manufacturer, windows, when updating, sometimes will attempt to override that driver with its own, but dies't uninstall the old company driver first...this causes tons of errors and all sorts of issues from slow transfer speeds to inaccessible data to issues with accessing data at all... to solve this, uninstall your ssd in device manager... then click hardware refresh...windows will auto install its default driver, and then you can once again reinstall the manufacturer provided driver.... yea its a pain
And lastly, some manufacturers provide an option on nvme ssd drives to "over-provision" a drive.. for exmample crucial does this... what this does is it allows you to allocate space on your drive that accesible only to the storage controller (the thing that telling everything where to go) this helps with managing operations and helps keep data from fragmenting..long story short it helps improve performance of the drive and helps increase its lifespan...think of it kinda like the QLC cache i talked about earlier...