The OAS pension: Full pension
Generally, you can qualify for a full OAS pension (the maximum benefit amount) if you have lived in Canada for at least 40 years after the age of 18.
There are certain circumstances where you may qualify for a full OAS pension without having 40 years of residence. (For example, if you were 25 or older and lived in Canada or had a valid Canadian Immigration Visa on or before July 1, 1977).
The OAS pension: Partial pension
If you do not qualify for a full OAS pension, you may qualify for a partial pension.
If you live in Canada when you apply, you can receive a partial OAS pension if you have lived in Canada for at least 10 years after the age of 18. If you live outside of Canada when you apply, you can receive a partial OAS pension if you have lived in Canada for at least 20 years after the age of 18.
A partial monthly pension is earned at the rate of 1/40th of the full monthly pension for each year of residence in Canada after the age of 18. For example, if you have lived in Canada for 27 years after the age of 18, you will receive 27/40ths of the full monthly pension amount. Once a partial pension has been approved, it cannot be increased due to additional years of residency in Canada.
(https://www.canada.ca/en/employment-social-development/programs/old-age-security/reports/oas-toolkit.html)