Minecraft doesn’t have a server browser, you have to input the hostname directly.
The way it works is Mojang publishes a text file of all the banned hostnames and the client downloads this when it starts up. If the server it tries to connect to matches any entries in the blacklist, the connection attempt fails with a cryptic network error.
It’s very shady.
Unless it was added in the past couple of years, Minecraft Java Edition does not have a built-in server browser. You can save servers to your list manually, but there’s no central list of them.
Yes, you could of course modify your client to connect to the server anyways, but that requirement would prevent all from the most dedicated players from joining a server and essentially kill the server’s player base.