You can't spawn a lot. Naturally spawned mobs such as enderman have a mob cap. This number for hostile mobs on vanilla Minecraft is 85-88.
Last map it was around 200 max I think. Enderman don't really cause lag due to not everyone being able to afk at once. But knowing cyp enderman will be capped at like 5lmao