First, I do not have some low-end machine: Ryzen 5 3600 @4.0ghz, RTX 2070, 16gb of 2666 ram, 1920x1080.
My problem isn't lack of ram.
Forget anything related to "outdated drivers", I know what I'm doing and that's not the issue.
Literally a shader and better foliage is enough to bring my FPS down to 30. I see people running way better than me while having way worse machines. I have all the allegedly performance improving mods you can think of, none of them make any difference at all. My GPU usage barely goes over 30% and CPU usage barely goes above 20%. I do not have any performance issues whatsoever in any other game, is Minecraft exclusively.
Also, other people get more than 80fps with better foliage, shaders and dozens of other mods while having worse PCs, if they can, I can, and that's just an example, without better foliage FPS still drops to **** all the time and the average is less than 40.
Well you could look for optifine/other performance mod tweaks to balance FPS, lower visual settings, or if possible change other elements besides just the amount of RAM to allocate with Java Virtual Machine arguments (I don't remember how to anymore since the Vanilla launcher has changed and I'm not too sure with other launchers).
Or just lower smooth lighting, particles, enable/disable Vsync and so on with the base game settings and see what happens.
Minecraft runs on a programming language, Java, not a game or graphics engine. Its not your typical video game.
What exactly does this mean? All games "run" on a programming language - that's what is used to write the actual code (e.g. Bedrock is written in C++), and the game engine (which all games have, whether their own or some 3rd party engine) is based on custom code on top of LWJGL (Light Weight Java Gaming Library); the only advantage of using a 3rd party engine is faster development time, while a custom engine can be written to better meet the actual needs of the game (much as one can make mods by either directly interacting with the code or relying on a 3rd party API like Forge; sure, Forge might have some advantages but it comes nowhere near the flexibility of directly interacting with the code gives, which is a major reason why I don't use it).
As for why the game runs so poorly, it is because the developers and most modders are incompetent - it shouldn't need more than 512 MB of memory at typical settings, 1 GB to be generous, no matter how many mods there are (I can get 1000 FPS in modded 1.6.4, using my own non-Forge mods, even in a "mega forest" biome with 64 block tall trees, and I hardly have a high-end computer. 1.6 was the last version before the requirements of vanilla really started going up, the official recommended requirements called for early-mid 2000s hardware, while Forge adds so much overhead that even with only optimization mods it performs worse than vanilla since it adds in so many hooks into critical code paths for the sake of a mod API and mod compatibility; "Porting it to vanilla would have very few benefits, as vanilla by itself is more efficient than even Forge+FoamFix." - of course, vanilla can still use optimizations, I've made order of magnitude improvements myself).
First run the modpack, then open the NVIDIA control panel. Once opened click Manage 3D Settings on the left, click Program Settings on the right. From there click Add, and choose Java and click Add Selected Program. Then below on Step 2, make sure it says High-performance NVIDIA processor. If not, click that drop down menu and choose it, then click Apply.
Also, here are some mods that might improve your performance if you have not already installed them: