After you are married, you can stay in Canada while you are sponsored for permanent residence. This process is called “inland.”
The advantages are that you can be together and apply for a work permit or study permit so you can work or go to school while you wait.
The disadvantage is that you cannot appeal a refusal.
Also, you shouldn’t travel outside of Canada during the process, unless you travel together.