Then disconnect the external drive (or even other external devices) to confirm macOS is fine, but the issue is due to an external device. Then try each device one at a time to see which one causes a problem. Sometimes a problem may only occur when a particular combination of devices are connected.
Once you determine the device which is causing the problem, then you can look further at it to try to determine the cause of the problem. I do know that some older devices may not be compatible with an M1/M2 Mac with Apple Silicon.....I have personally experienced this and have seen numerous reports on these forums.
Also, sometimes a particular third party device, or software driver will cause problems with other connected devices (especially with macOS 12.x Monterey, and I believe 13.x Ventura as well). One such driver & device are the Wacom tablets which can prevent some external drives from working properly. Usually if the Wacom tablet is disconnected when the external drive is connected, then the drive will work. Connecting the Wacom tablet after the drive is mounted usually seems to allow both the external drive and the Wacom tablet to work thereafter (at least from what other users have reported on these forums). Perhaps other drivers & hardware may have a similar issue.