For years I commuted with a 30 litre l backpack (no laptop back then)
Then I switched to a duffel/gym bag of similar capacity and bungied it to a rear rack. Waaaaay better for riding, but a little fiddlier to mount and remove each time. Still better tho
Now I have my rear carrier and gym bag, but need to carry my laptop every day too. I simply bought a “EBOX” daypack from the computer store. It looks like it’s about 25 litres or so. I still carry most of my gear in my gym bag on the carrier and only carry my laptop on my back. Makes for way easier cycling given the reduced weight on my back and shoulders.
I’ve been doing this for about 2 months now and it works fine. I haven’t had to set up for running with a laptop so can’t comment if you will be doing that option as well