A few mods that fit in with 'Kingdoms' is Ancient Warfare (structures, NPCs [new ones by the mod, they do need food I think from memory but if you have farmers that take care of their crops or a town hall to put food in that NPCs come back to then your fine] that can be used for Armies, Automation of farms and otherwise, even Catapults/Vehicles).
Minecraft Comes Alive changes the Vanilla/regular NPCs to more interesting ones you can talk to, marry and other things.
There used to be Tale of Kingdoms (just noticed there is a revival so it might turn out well) which was a 'help the kingdom with doing tasks to rebuild it or become king I think' but it's not so great anymore at least the last time I used it. It was fine around 1.5.2 or so but in recent versions it either disappeared or got glitchy but they did there best to maintain it. Not sure what happened to this one but was cool. Only know about it from CaptainSparklez 1st modded survival from around that time.
There is probably many more but more creative like CustomNPCs I guess.
Try searching on Curseforge for kingdom or castle, or medieval or otherwise and see what comes up.