I have no first hand knowledge of stopping a bear charge. Never had to thankfully. However, because I am occasionally in bear country, I try to be as prudent as possible. To that end, I try to gain information from more informed sources.
Two different reviews of bear attacks had similar findings. Bear spray was successful in stopping bear attacks about 90 % of the time, firearms about 60% of the time. If I remember correctly it took an average of 4 shots to stop a bear. The typical bear attack occurred something like 3 or 4 seconds after the bear was first seen.
Therefore, I always carry bear spray in bear country. And, a firearm, if possible.
Not knowing a lot about handguns and bears, I tried to follow Phil Shoemakers advice, and carry the most powerful handgun that has manageable recoil and in my case that is a S&W Mountain Gun in 44 Magnum with cast bullets.
I am not putting the above information out as my own or as being original, but as at least having some reasoning behind it.

Fred