You need to get a TRV first, which can be difficult depending on your profile (or easy in some cases).
Entry into Canada is not guaranteed, even with an approved TRV. CBSA will sometimes deny entry into Canada if they suspect the purpose of the trip is birth tourism.
And of course you have to cover all of the costs of the birth yourself. Budget at least $10K but the costs can of course be much much higher if there are any complications. You need additional money of course to cover accommodations, food, etc.
Would add that if you manage to give birth in Canada and you hadn’t mentioned your intention to give birth in Canada in your application you may have difficulty visiting Canada in the future.