If it's Montreal or any other city in Quebec, it's ok for you to land directly in Montreal.
But if that's a city besides Quebec, e.g. Vancouver, Toronto, then you have to finish your landing procedure besides Quebec first, then travel to Quebec.
But if that's a city besides Quebec, e.g. Vancouver, Toronto, then you have to finish your landing procedure besides Quebec first, then travel to Quebec.