Recently i have bought myself a nice gaming laptop, which should run Minecraft just fine. (8 GB ram, Ryzen 7 & good graphics card)
Before my laptop arrived i had already done some research on some servers i wanted to check out. I installed Optifine for the specific Minecraft versions needed to play those servers, and tried to try some of those servers out. My first attempt actually let me play the server for a couple minutes, before logging out and deciding to tweak some settings, and do some stuff IRL.
The next day i decide to try out some more servers, and from this point on i get this issue. I log into a server, it lags insanely much (upon logging in i managed to press F3 once and i got 2 fps), and after 5-10 seconds my client just freezes. Sometimes the client closes itself automatically and says something caused the client to crash, other times the screen freeze just stays there until i force exit the client.
Later on i completely removed Minecraft, reinstalled the latest version, and decided to try out a very popular server which runs on the latest minecraft update (1.16.4), with a completely fresh Minecraft, without optifine. Same issue happened here as well.
Would very much like to solve this issue. If needed, i can post the complete specs of my laptop.