The first step in troubleshooting is to reboot your Mac.
Another step is to restart your Mac in Safe mode.
Safe mode will often correct weird software behavior by forcing the OS to clear caches, do disk repair and other self-maintenance and housekeeping and temporarily disables third-party mods.
How to use safe mode on your Mac - Apple Support
Does the problem go away in Safe mode?
If so, this may indicate a potential third-party software conflict.
You can exit safe mode by restarting your Mac normally, then reevaluate the problem.
You can also use Disk Utility to check the Free space available on your startup drive.
If less than 50 GB or so then you'll want to seriously consider taking steps to free up additional space.
Get detailed information about a disk in Disk Utility on Mac - Apple Support
And you can use Activity Monitor to see what may be keeping the CPU busy and what the Memory Pressure is reporting. If Memory Pressure is in the green you have no problem.
View CPU activity in Activity Monitor on Mac - Apple Support
View memory usage in Activity Monitor on Mac - Apple Support