When installing Windows on an old or new PC, you can either format the C drive and then install or delete old Windows files and then install. In both cases, Windows will install and overwrite any file ...
This process is called a clean install, which is ironic as there's nothing particularly clean about it: Microsoft has enshittified Windows Setup.