You can edit the hosts file with any text editor. There are a variety available, but both Windows 10 and 11 come with Notepad ...
You can block websites on a Microsoft Edge browser using Command Prompt, as there is no built-in feature for it in the browser.