It's always a good idea to start any major changes to a Windows system with a full backup. This will allow you to restore the system to its original state in case something goes wrong with the changes or repairs. Fortunately, most versions of Windows have a built-in tool called Startup Repair or Automatic Repair that can help correct these problems without needing to reformat. DISM (Deployment Image Servicing and Management) is a powerful command-line tool that can be used to repair corrupted files and system images.
It supports a number of capabilities with matching switches and parameters, but the basic syntax for repairing system files is quite simple (although it often requires several passes before you can resolve the issue). In some cases, additional work may be required to restore your PC to its previous state, or at least close to it.