Lots of good advice so far, IMO.
In the early 2000s, the G29 was my first "bear defense auto" that could replace my 44 revolver and also double as a CCW; my one gun for everything idea. It is a snappy little sucker with 200 grain solids @ 1,200 fps "bear defense loads". It's not terribly easy to shoot for someone with no previous experience. I remember other people not liking shooting it with those loads due to the recoil.
I'm in AK and grizzlies and black bears literally in my yard isn't that uncommon, so I've paid a lot of attention to actual bear defense cases and always carry something. I've gone through the 10mm and 45 Super options for bear defense, but now carry 9mm. Reading the actual cases, from 9mm and up, handguns have been 100% successful for bear defense, grizzlies or otherwise, as long as hits are made. I would 100% go with a 9mm in your case as hits are the most important factor, and that's going to be easier to make happen with a 9mm, compared to a 10mm.
IMO, a G19 would be a much better alternative to your G29 option, as would a lot of other 9mms. My advice would be to pick the 9mm you like the best and shoot the best; a ton of options out there.