Hi and thanks for reaching out! I'm an Independent Advisor and a Microsoft user like you. Please allow me to assist with your issue.
I assumed you are trying to backup your Samsung A51 phone to the computer. Robocopy will not work in this case because the connection between your phone and computer is MTP based, and a drive letter will not be presented in Windows. You can read more about this in this reply - https://superuser.com/a/377008.
An alternative I could think of is to compress the files you wish to preseve the timestamps into a single file (zip, rar, 7z, etc), then copy the zip file into Windows and extract it. There are a few such apps available from app store. Using a MicoSD card to transfer the compressed file will be more performant.
Please let me know if I can help you further!
Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.