I managed to solve it by pressing: windows + r
typing this code: powershell -command "Start-Process notepad "$env:windir\system32\drivers\etc\hosts" -Verb runas
will open a windows confirmation and click yes
a notepad will open and you have to delete the last two lines. as in the picture.
then restart minecraft.
I also can't access minecraft servers, such as hypixel, among others.
my skin doesn't appear in any version of minecraft
I did everything the link you sent me, but my skin still doesn't appear, it just stays with steve, it doesn't even change for alex.
and also have to disable windows firewall