This process is called a clean install, which is ironic as there's nothing particularly clean about it: Microsoft has enshittified Windows Setup.
If your mouse is not working in games on your Windows 11/10 PC, this article lists some effective fixes to help you resolve this problem.
Microsoft's KB5077181 security update has caused endless restart loops and system lockouts for Windows 11 users, with no official fix released as of February 13.