As HoboMaggot mentioned, each update to Minecraft makes it even more poorly optimized than it already is. Minecraft is not built in a language (Java) meant for games to be made with. That is why a lot of people can play what they consider more "demanding" games such as Call of Duty, Battlefield, Cyberpunk, etc. but have poor performance in Minecraft. You can't compare those types of games together. Those large games are made using proper, optimized gaming engines meant to squeeze as much performance out of your PC's hardware as possible. Minecraft (especially Java Edition) is not and it only gets slower each time an update is released.
If you want to get better performance in the game, you can either use some of the mods already mentioned like Optifine or FoamFix which could boost your FPS or just buy better hardware.