.....
Moving forward, just install Google photos from the play store and set it to back up your photos and videos....
This point has cannot be emphasized enough, it's really vital to implement a backup solution for any smartphone. As you've discovered, it is a really risky thing to rely on storing important files solely on your phone. Smartphones are intended to be mobile and handy, two aspects that make them unreliable as long-term archiving storage. Even if you had never encrypted your microSD card nor did a Factory Reset, the odds are just high that something is likely to occur with your phone -- it gets lost, or stolen, or damaged.
The Google Photos app does include a backup and restore function that automatically runs in the background. It will backup your entire photo library into your online Google account so you can access your photos and videos using either the Google Photos app on your phone, or a web browser on a computer by going to:
https://photos.google.com
https://play.google.com/store/apps/details?id=com.google.android.apps.photos&hl=en_US&gl=US
If you install Google Photos, be sure to go into the app's Settings menu and configure the backup and restore function the way you need it (i.e. include video content, use WiFi/cellular or WiFi only, etc.). And recently Google changed its long-standing policy on unlimited free storage for photo content, now you get 15GB of storage for free, and if you need more than it isn't that much -- 100GB is only $20 a year.
https://one.google.com/about/plans
Just for comparison, Microsoft's OneDrive and Apple's iCloud online storage is only 5GB for free so their pay-for upgrades tend to be more of a necessity. It's all conditional though, for some 15GB is a quite a bit, for others it's barely adequate.
A different option than Google Photos is to use Samsung's Smart Switch utility. It has a backup and restore option that allows you to do more extensive backups to a PC. So it's not limited to just photo and video content but essentially your entire user account on your phone.
https://www.samsung.com/us/support/owners/app/smart-switch
One last suggestion if you want to minimize a reliance on services that involve a lot of corporate oversight, like from Google or Samsung, is the Syncthing service.
It's an Open Source (no ties to any business interests) syncing service that you set up to sync directories you specify with different storage media in mobile devices, computers, online storage servers. You can set it up to only work within your home network (no online storage) or with various online storage services. It's quite versatile but it also requires one to pay a lot of attention to set things up the way you want.
https://play.google.com/store/apps/details?id=com.nutomic.syncthingandroid&hl=en_US&gl=US
https://syncthing.net/