A handgun, even in common cartridges like 9mm, 40, and 45ACP work a lot better than conventional wisdom has stated for years. My weapon of choice when around bear is a Glock 29 loaded with 200 gr hardcast ammo. But I've seen enough evidence to feel that a 45 ACP with 255 gr hardcast is suitable.
And while it is really pushing things even the big bear have been killed with 9mm.
https://www.ammoland.com/2019/08/han...#axzz76IdUj3bu
Shotguns with buckshot have not proven to be a good option. Slugs, especially modern slugs work pretty well. If I'm hunting bear then a rifle is my choice, but for a surprise attack I prefer to keep a handgun that is always easily accessible.
A guide was killed by a grizzly 3 years ago while gutting an elk shot by a client with an arrow. He had a Glock 10mm, but left it in his pack while gutting the animal. Might have turned out different had it been on his belt.
https://snowbrains.com/jackson-guide...izzly-wyoming/