If your liege isn't a complete idiot, they'll eventually conquer towns or castles and, if you're pulling your weight, you'll receive some of them as your own. The indirect method of getting a settlement in Mount & Blade II: Bannerlord involves being someone's vassal. You also take control of any villages under the castle or town's control. You'll have to fight your way through them, victory transferring the castle's ownership over to you. Once you've dispatched the outside troops, if any show up, lead the assault in the inner garrison. How quickly that happens is determined by your character's Engineering skill. Siege weapons can also make your life easier, destroying fortifications. You'll need a sizeable army of your own as you'll likely have to deal with both its defenders and additional troops the owner might send your way. Early on, you'll want to target castles as even with smaller defending armies capturing one does require quite a bit of effort. Once you've done that, you're free to select a castle or town to siege.
Just raid one of their villages which, aside from pissing off the owner, also yields loot for your army. Getting someone to hate you enough is terribly simple, though. In order to do so, you'll first need to be at war with another faction. The direct method of getting a settlement in Mount & Blade II: Bannerlord involves, as you can probably tell, using brute force to siege it and defeat its defenders.