I shall suggest you- look at the Event viewer immediately after such freezing, so that you will get a clue why it's happening.
Back up all your important files to an ext. drive.
Boot into Safe mode: Then try Settings > Recovery > Reset this PC
Download the Media Creation Tool:
https://www.microsoft.com/en-us/software-download/windows10
Make a bootable USB Drive.
Boot from this drive and Troubleshoot > Startup Repair (try this first).
If that fails, go to Troubleshoot > Reset this PC > Remove everything or Keep my files.