I'll try to write some tips, maybe you have tried them already, I dunno-
-Be sure to not install any mods into the game, some are outdated and may glitch it-
-Check your antivirus and windows defender, they may have done something with it-
-After succesfully logging into the "play game' tab, keep it open and don't rush to join the game, wait some minutes-
-Be sure your name doesn't have unknown initials like ~, because now the game doesn't accept them anymore, just change the name. Same with the password, try using english letters and numbers only-