You can edit the hosts file with any text editor. There are a variety available, but both Windows 10 and 11 come with Notepad ...
If your PC won't boot, all is not necessarily lost. You can save data from your storage drive via one of two methods.