Some things to try to resolve the problem:
i) Wipe the cache partition and check if it then works OK.
ii). Start the phone in safe mode and check if it works OK. If it does then a downloaded app is the cause of the problem. The trick is to find out which one. You will need to uninstall each downloaded app, one by one and test the phone in normal mode between each uninstall. When it works OK (allow a bit of time to be sure), then the last downloaded app that was uninstalled was the culprit. A downloaded app is one that you downloaded and installed on the phone and wasn’t pre-installed when you first got it.
iii). If the above do not fix it, then you may have to consider a factory restore (aka hard reset, master reset) for the phone.
Be aware that a factory restore will erase all your data and downloaded apps. It will restore the phone to its factory default condition (or last system updated condition). Backup the phone to the cloud or a PC before performing the factory reset using the Backup feature in Settings. If the factory reset resolves the problem you should be able to restore it with the backup you made earlier, by using the Restore feature in the phone Settings.
If the phone has a Google account you will need to remember the account user name and password to access the phone again once it has been reset, due to the FRP (factory reset protection) lock that is activated by the factory reset.