There is a legal requirement that you must demonstrate your residency in the UK by way of becoming a permanent residence. If you get marry a British citizen, you will need to complete at least 5 years as a Spouse before you can apply for indefinite leave to remain in the UK. Once you have obtained ILR, you will then be eligible to apply for naturalisation as a British citizen.
If you are considering applying for a partner visa UK or spouse visa, it is essential to understand the rules and process required for a successful application. My Legal Services given they have a vast experience and expertise in UK immigration and EU law matters.