1st option is to make a civil war:
Be a vassal of a kingdom and attack the city, if you take it request
that it is given to you.If the lord denies you declare war on him.
2nd option is to attack a lord of a faction, then you are at war with that faction
and the option to besiege the town will appear.That will trigger the creation of your own
kingdom.
Just make sure you have a high right to rule, otherwise it's going to be very difficult.