I experienced this is in snapshot 21w44a in single player. While it may not be an option for all players, I was able to work around the issue by increasing the ram allotment via the Lanucher > Installations > [your install] > MORE OPTIONS > set "-Xmx#G" argument in JVM ARGUMENTS where # is the number of GB of RAM to allocate. There is still a significant lag spike, but the game no longer crashes.
I experienced this is in snapshot 21w44a in single player. While it may not be an option for all players, I was able to work around the issue by increasing the ram allotment via the Lanucher > Installations > [your install] > MORE OPTIONS > set "-Xmx#G" argument in JVM ARGUMENTS where # is the number of GB of RAM to allocate. There is still a significant lag spike, but the game no longer crashes.
(edit: Jira auto-formatting correction)