One option is to check if your laptop is set to automatically install updates. You can go to the Windows Update settings and disable automatic updates or configure them to install at a time that is convenient for you.
Another solution is to create a backup of your important data, including your passwords and bookmarks, before restarting your laptop. This way, even if Windows reinstalls itself, you can restore your data from the backup.
By the way, when I encountered similar issues in the past, I also made sure that I had a genuine
windows key to ensure smooth performance and updates. It's always important to use legitimate software to avoid any unexpected issues.