Houses are required to expand beyond four Villager slots. Each village has its own unique house item. To set a house down for a new villager it must match the current village you live in. This means if you live in Oceandome, you can't set down a Dragonsmaw Manor house there. It has to be an Oceandome house.
If a player moves to a new Village, they'll be able to continue using their current Houses.
Villagers with the Animal Husbandry career always start off with ten default slots to keep animals inside, which never need to be repaired. If you'd like your villager to hold more than ten animals at once you'll need to obtain more slots by giving them Animal Stables. You can either use your Construction Worker to build one or buy one from the stalls. After you obtain one, simply search your inventory and give it to your villager.
Similar to Animal Husbandry, Herbalists always start off with ten slots to plant seeds into, which never need to be repaired. To expand past ten, you must use your Construction Worker to build a herbalist pot or buy them from the stalls. This will allow them to plant more seeds with each additional herbalist pot. Up to 90 additional pots can be added, to bring the total planting spaces to 100.