Hello Thomas,
If you test in safe mode, does the same thing happen? Safe mode loads only what it needs to run.
To start in safe mode, begin with the computer powered off. Follow the directions found here, depending on what type of Mac you have: How to use safe mode on your Mac - Apple Support
The computer will take longer to start in safe mode, and the screen may have some distorted video as it starts up. This is normal. Once you are logged in, use the system and test to see if the issue continues.
If everything seems to work as expected, go ahead and restart the computer normally and test again. Starting in safe mode forces the computer to run some disk checks similar to First Aid. This can resolve some issues.
If the issue returns, this would indicate something running at startup is causing the issue. We would follow these steps to remove login items and see if that helps: Remove login items to resolve startup problems on your Mac - Apple Support
Cheers.