Well, you should probably ask this question in the minecraft java forums, not here. But there are some performance enhancing mods that are allowed. For pre 1.16, you can use optifine, but it is banned for 1.16+. For 1.16, you can use phosphor, lithium, or sodium.
My pc also runs minecraft poorly, and if you want to keep the game vanilla, you can always turn down your render distance, change the graphic quality, turn off clouds, and close all other applications running in the background.
yeah maybe I will do that aswell good point, I thought im asking here because I think a speedrunner would probably figured that out if anyone got a similar problem. I know that it runs poorly, especially java but it cant be that bad..yeah optifine is banned so I might be trying sodium but I dont know if its worth. render distance is probably the only thing that changes something but I really cant lower it more than 18 chunks imo