I remember reading outdoor magazines in the distant past (when TGO was simply The Great Outdoors). They all used to say 30-35l or 50l in winter to carry the extra kit you must carry to be safe in winter walks. Lol!
In summer I used to get by with a 5 or 7l bumbag. I once enjoyed an autumn overnighter using a 20l alpkit Gourdon drybag style rucksack. That was tarp, bivvy, quilt, stove, warmth layer, waterproofs, mat (OK a 130g CCF from Robens that I cut down to just torso sized so perhaps 65g), food and water. Plus few other things I've forgotten but you get the idea. You can actually sleep out with very little rucksack cavity if you're committed to doing so.
So the question is like asking how long is a length of string. The answer is whatever you want it to be.
BTW 20l was stuffed for me and being a cheap rucksack without the best harness it rolled about a bit but the low weight didn't make that an issue. When you're walking with enough for a night or few and it feels lighter than the it you used to carry for a day trip. Well you certainly have a spring in your step. I used to camp out one night and meet a walking group partway up the hill on a group walk and my overnight day pack was lighter than most of the group's bags. When organising these meet ups they used think my heavy bag will slow them down, not after they saw my kit!
Anyway, I digress a lot!!!
Imho a 15 to 25l rucksack is about right. With a few caveats. First if you carry more kit than most you will need more or cut back on kit. Second, bigger ppl need bigger sacks for the same kit but also perhaps for better fit of the bag. Thirdly two rucksacks with the same capacity from two different brands will not be exactly the same volume I real terms. Many reasons my just down to brands pulling a fast one. Some styles of rucksacks suit your needs more than others and others have better features that when to carry more such as large, external, stretchy mesh pockets to carry often needed bulky waterproofs outside the main bag. In that case it might seem to you to have more actual capacity than another bag labelled with the same measured capacity. That's partly down to volume measurement standards I reckon not working well for some designs.
As I said, no simple answer.
PS sorry I'm still a little bit too much of a gear nerd!