Thats it, as the title says, everytime a new player joins the server, it lags for few seconds. Also, when regular players join/die/change world the server lags for a few seconds as well.
Theres no errors in the console!
Some people told me this could be a PEX/EssentialsX/InventoryRestorer/WorldGuard problem so I changed my permission plugin to “LuckPerms” but I do not know what to do with the other ones. Sometimes if players use /teleport command of essentials it lags as well