Really depends on the types of bikes you own and where you use them rather than any one correct answer.
I live on the Northern German plain where as the name suggests, there are precious few hills. So for commuting on flat roads I find the single sprocket on my folding bike more than enough.
For leisure use though, I have a Mountain bike and a Gravel bike to take advantage of the thousands of kilometres of forest roads and heathland that we have here. The trails are a real mix of gravel, fine sand and mud, it can be pretty heavy going but fun. Both bikes are equipped with 1x drivetrains which enables them to run the wide tires I need as well as being hassle and fuss free.
The Gravel bike has a 11 speed 10 - 42 cassette married to a 34 tooth chainring, which for the most part gives me all the range and gears I need. The problem comes when I load the bike up and go touring in mountainous regions, I just don't have low enough gears for the hills, so I end up changing the chainring for a 28 tooth one, sacrificing top end speed for low down climbing ability.
The Mountain bike though, comes with a 12 speed set up, a 11 - 52 cassette married to a 34 tooth chainring and this is brilliant. The lower cogs give me all the day to day useability that I need and then the 52 tooth cog gives me the mountain climbing ability when I need it. As last years bike packing trip to the Swiss Alps proved, this really is a good spread of gears that will take me anywhere.
So for my bikes and useage 12 speed is the ideal cassette size, so much so, that when funds allow I'll be converting the gravel bike to 12 speed.