How old is the Mac, can you mention the mac model?
Have you tried safe mode for troubleshooting?
Start up your Mac in safe mode - Apple Support (Takes more time to boot)
Note: Safe mode prevents your Mac from loading certain software as it starts up, including login items, system extensions not required by macOS, and fonts not installed by macOS. It also does a basic check of your startup disk, similar to using First Aid in Disk Utility. And it deletes some system caches, including font caches and the kernel cache, which are automatically created again as needed.