First you named like 3 different phones so hopefully this is in the right place. LOL.
And before we go too much farther, welcome to Android Central. The S10 is a great phone and I haven't seen any posts complaining that they are having issues with SD cards. Same for the Note 10. Anyway this could be caused by something like a bad app and the way you describe the issue that's the way I'm leaning. Everything is OK right after formatting the card, it also works when the phone is restarted, and after a few the issue pops ups. Kind of like something opened or happened in the background like an app opening or something. One way to begin troubleshooting this is to see if the issue occurs in Safe Mode. If it doesn't happen in Safe Mode it likely points to a bad app. To get into Safe Mode, press and hold the power button until you get the options to power down, restart or go into emergency mode, then press and hold power off until the option for Safe Mode appears, tap that and allow the device to reboot. Since your issue happens over time, check to see that the SD card is shown and then wait and see if the thing happens where it doesn't see it anymore. If the time passes and the SD remains then there is a good chance it is related to a bad app.
If nothing happens in Safe Mode. I mean the card remains visible and doesn't require a restart to get it back or anything. I would go to your Permission Manager and remove permission from all apps for Files and Media. This is the permission that allows apps to access and make changes to your storage. Whatever app is causing this issue likely has this permission. Don't worry this is not forever and will correct itself naturally over time. Removing this permission will cause any app that needs this permission to ask for the permission again the next time you open the app or the next time that app needs access your storage. It will be like using the app for the first time all over again. If the issue goes away after removing the permission you'll have to be a detective for a while. Apps that need that permission will ask for it again and as apps request permission to access your storage keep track of which ones ask and when. If the issue returns more than likely it was one of the last apps to request permission. From there you can decide which ones to keep, toss or deny permission to.
Something to consider,
Have you downloaded any apps from a random place online, someplace that is not the Play Store, Amazon App Store or the Galaxy Store? If so those would be the apps I'd look at first. App stores outside of the ones I've named may not screen apps as well as the big boys. There could also be problems with the apps themselves, this is one reason I recommend sticking with the mainstream providers and being very cautious about accepting anything from other places.
Let us know what you find.