Settlements are very important in Mount and Blade 2: Bannerlord. At certain points in the main campaign, you will need to have your own settlements, so knowing how to get them is important.
The easy way to get a settlement, at least comparatively, is to take it. Find one you like, and then set about taking it from whoever owns it. Find the settlement you wish to take over, then raid a nearby village belonging to that kingdom. Go to the village on the map, then select “Take a hostile action”. This will allow you to raid the village and will mean you are now officially at war with the faction that owns the village, and the nearby castle you had your eye on.
When it comes to picking which castle you want to take over, you should carefully inspect it to make sure you can win the battle. You will need to take on the settlement’s full garrison, so search around for a nice weak one to take over. You will need to make some Siege weapons to take out the castle walls, as this will cut down the length of the battle considerably. Either way, it’s a risky venture, so make sure you have a good strong army before you try.
The other way to get a settlement is longer but safer. You can join a new kingdom and do quests and tasks for them, fight their enemies, and generally be helpful. Eventually, you will earn a settlement as a reward.
To join a kingdom, you will need to speak to a Lord at a castle. They will offer you contracts, and eventually, you will be able to join the kingdom officially.
Either way involves plenty of work and risk, and there will always be a serious impact on your diplomacy with someone, so be aware of exactly who you will be aggravating with each path.