ronald1987
As Joe has said before you get married, your need to apply for a Certificate of Approval (COA), which is written permission to marry in the UK, unless you get married in an Anglican Church

In order to qualify for a Certificate of Approval, you must have been granted a student visa for at least six months and at least three months must remain.
Application for COA does not allow you stay in UK beyond your current visa expiry.

After marriage, you apply for leave to remain in the UK as a spouse.
There are strict requirements that you will have to meet. FLR is not automatic.

If you go ahead and get married without following correct procedures, you will put your
chances of getting FLR in danger.