Has this external drive ever worked properly on this particular Mac? If so, then what has recently changed just before this issue began?
How was the drive encrypted?
What file system is on the external drive?
Try running Disk Utility First Aid on the external drive after the drive has been unlocked and mounted. Within Disk Utility click "View" and select "Show All Devices" so the physical drives and hidden Containers appear on the left pane of Disk Utility. Run First Aid on the physical drive, then run First Aid on the hidden Container. Even if First Aid says everything is "Ok", click "Show Details" and scroll back through the report to see if any unfixed errors are listed. You can try running First Aid several times to see if the error is fixed, otherwise you will need to erase the drive and restore the data from a backup.
Disconnect all other external devices in case one of them is causing a problem. Some other external devices may affect how external drives behave...most notably a Wacom tablet (apparently everything is fine as long as the external drives are mounted before connecting a Wacom tablet), but there may be other devices which could interfere as well.
Connect the external drive directly to the Mac. If you are using an adapter for the external drive, then try using another adapter. Maybe try using another data cable for the drive and try connecting the drive to another port.
Try booting into Safe Mode to see if you have the same issue.
You can try checking the health of the external SSD by running DriveDx. You may need to install a special USB driver in order to access the heath information on the external drive. Even with the special driver, some USB chipsets used by external drives/adapters/docks/hubs won't allow the necessary communication to access a drive's health information. Post the complete text report here using the "Additional Text" icon which looks like a piece of paper.
What is the exact make & model of the external SSD? You specifically mentioned Thunderbolt 3.... so there is a lightning bolt icon next to the USB-C port of the external drive? Most external SSDs tend to only utilize the USB3 protocol even though they have a USB-C type port.
Also, not all devices are compatible with an M1/M2 Apple Silicon Mac....usually older devices.