Minecraft 1.20.5 and newer are now using Java 21 - you have to turn off the firewall (windows defender) for public network / or set java.exe/javaw.exe to public More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.