To disable automatic restart, view Advanced System Settings by right-clicking on "This PC," selecting "Properties," and clicking on "Advanced system settings." In the System Properties window, click on the "Advanced" tab, then click on "Settings" under the "Startup and Recovery" section. Uncheck the box next to "Automatically restart" and click "OK." This will prevent your computer from automatically restarting after an error, allowing you to read the error message and diagnose the issue.