If your enemy is dug in in an urban area, you bomb the hell out of it before you send in infantry to clean up. If you don’t use artillery and bombs the defenders will mow down the assault units.
This is how urban war is played out between near peer armies.
Think about this, I’m in a concrete bunker with a machine gun, do you want to charge the bunker and get shot, or do you want to call in an airstrike to destroy the bunker with the machine gun position? I know what I’d do