Try restarting your device. If your device is frozen with the screen on, hold down the power button for about 30 seconds and restart your device. Restarting your device will sometimes do the trick.
If your device continues to freeze more than once, you might want to troubleshoot and check the following:
Check for device and app updates, check storage and clear space, close apps that are not in use, check to see if an app is causing the problem.