This is all a personal decision, but I clean my guns EVERY TIME they get fired.
I've never seen a gun damaged by PROPER cleaning and maintenance but I've seen many damaged by lack of cleaning.
Modern ammo isn't corrosive like pre-war ammo, but still, moisture from the air can get under fouling and rust and pit a gun.
All this is up to you, some people brag about seldom to never cleaning a gun, but since I have to pay for my own and can't afford to buy a new one whenever I want, I take good care of my guns.
Some people brag about never changing the oil in their cars either, but I take good care of all my machines, which is why even my well used guns are in excellent condition.
Personally I don't really see any good reason NOT to clean a gun, that for me is part of the pleasure of owning guns.
People who don't clean their guns seem to be just lazy and don't really care about them.
For personal defense firearms I give them extremely careful full maintenance whenever fired and I carefully inspect them often to check for proper lubrication.
Since I'm trusting my life to these guns, I give them the best possible care, just like I carefully inspect and maintain safety equipment I depend on to protect me.
At a absolute bare minimum I clean the bore and wipe off the bolt face with solvent.
These are areas that firing leaves bare of rust preventing lubricant, so I give them some attention every time they get fired, whether 100 rounds or just 1 round.
I always at least wipe out the bore every time I fire a gun.
I admit I'll refrain from a full field strip and meticulous cleaning if I only fired half a dozen shells or let someone try it out, but after 20 shells or more then yeah I get in there with a brush and a lot of cotton patches and clean all the carbon off along with re-oiling before putting it away.
The more frequently I clean an interior area the softer of tools I tend to use (bore mops and lots of cotton patches with solvents instead of heavy brass brushes) but I still break out the heavy brushes at least once a year to really SCRUB things.