There are different ways to block websites on Windows 10 and Windows 11, including using built-in parental controls, editing the hosts file, or using third-party software. Here are some methods you can try:
Using built-in parental controls:
Go to Settings > Accounts > Family & other users > Add a family member > Add a child account.
Follow the prompts to set up the child account.
Go to family.microsoft.com, sign in with your Microsoft account, and select the child account you want to manage. Under "Content restrictions," select "Web browsing" and turn on "Block inappropriate websites.
Editing the hosts
Open File Explorer and go to C:\Windows\System32\drivers\etc.
Right-click on the "hosts" file and select "Open with" > "Notepad."
Scroll to the bottom of the file and add the line: "127.0.0.1 www.example.com" (replace "www.example.com" with the website you want to block).
Save the file and restart your web browser.
Using third-party software: There are many third-party software options available for blocking websites on Windows, such as Cold Turkey, Qustodio, and Norton Family.
Download and install the software of your choice, and follow the instructions to set up website blocking.
Note that these methods may not be 100% effective in blocking websites, and determined users may be able to find ways around them.