We made another modpack and it works for all of them except one of my colleagues.
It has 16GB of RAM and 8GB of RAM allocated to Minecraft.
Nevertheless Minecraft consumes 14GB of RAM, which causes Minecraft to crash.
He is in the process of reinstalling Java, but I figured maybe someone here knows a few other ways.
It could be because of the modpack…
Everyone else doesn't have that much RAM, so I guess that can be ruled out.
But thanks anyway for the quick answer.