You can go to System Preference > Energy Saver/Battery and check whether you've ticked the option to Put hard drives to sleep when possible. If so, uncheck it and your USB drive should appear in Finder. Below is a more detailed process of how to do so:
How to fix USB drive not showing up in Finder:
Step 1. Click on the Apple logo from the top-left corner of your Mac screen. Then choose System Preference from the drop-down menu.
Step 2. Locate Energy Saver/Battery from Apple settings.
If you are running macOS Catalina and earlier macOS versions, spot Energy Saver from Mac system settings.
If you are using macOS Big Sur and later, on Mac desktop models, click on Energy Saver. If you are using a MacBook, choose Battery.
Step 3. In the Energy Saver panel, scroll down to find an option named Put hard drives to sleep when possible. If it's ticked, uncheck it.
In the Batter panel, click on Battery from the left column. On the right window, uncheck the Put hard drives to sleep when possible option as well.
By doing so, the macOS won't hide your USB drives in the Finder and you should successfully solve the USB drive not showing up on Mac issue.