If the game window is freezing, it might be caused by not enough memory. You might want to allocate more memory to Minecraft. If you want to be sure, you can press F3 to show the debug menu, you should be able to find memory status on the top right corner of the menu and see if the game freezing match up with the memory getting full.
(do note that it is generally not recommended to allocate more than 8GB memory as old minecraft is very poorly optimized and might cause memory leak)
1 Like