You can block websites on Google Chrome using an extension called BlockSite or in Settings.
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 easily block a website on Firefox — but you'll need to download the Block Site extension first.