The population control system in Sims 4 is very complicated. It generates NPCs at a random interval without exceeding the limit of Sims determined by the player for the game version.
The limit in the game menu is always good to double as it might affect performance.