This is a list of usual suspects in case of modded minecraft problems. See also my Modded Minecraft Crash Database for examples of crash reports and logs. Also superpowers04's Recommendations On What To Avoid are a good resource
Some functionality can be implemented via datapacks. This is not always a good idea, as seen in the datapacks (sometimes packaged as mods) in this section.
When a datapack tries to check what item a player/entity is holding, it has to do that via the nbt selector.
This causes the entire data of the entity to get serialized.
If this is done every tick, you get a slow and laggy world.
Especially if you have more crafting recipes, since the recipes a player unlocked in their recipe book are part of the players NBT data as well.
Datapacks i know that do this are:
If your game is lagging, try disabling graphically demanding mods first, since they are, well, graphically demanding.
Stuff you can't describe well, unreadable stacktraces/logs, ...