The issue is mostly because the lack of available memory. The photos may count for 10 GBs in size and it will dramatically affect the copy process. You can copy a few less in one time and repeat the action for more times.
From my experience, it is more convenience to use dedicated app or software for backup purpose. Firstly, it will display all photos from various apps into one place. Secondly, you can preview and select the photos you want to backup. Lastly, it is also able to connect your phone and the computer via WiFi connection.
Take a look at this guide as example: https://www.tunesbro.com/transfer-photos-from-android-to-computer.html
TunesBro DroidGeeker is one of my favaroite software for device backup!