To fly to Canada, travelers from many countries need to obtain an Electronic Travel Authorization (eTA).
You can apply online through the official Canadian government website:
https://www.canada.ca/en/immigration-refugees-citizenship/services/visit-canada/eta.html
Simply fill out the application form with your personal and passport details, then pay the fee online by credit card.
The eTA is usually approved within minutes, but it’s best to apply before booking your trip.