If I want a sound to punch through the mix, I leave the transients alone or maybe even heighten them. If I want something to sit back in the mix or drone a bit more, I squash or clip them away. Squashing them will create a compressor pumping sound; clipping them will make the whole thing sound flat.
For me it starts at the preamp. If I want something "punchier", I dial my preamp master volume down and the input gain up. I like the way it sounds when it's pushed. For something more natural sounding, I turn the gain down and the master up.
When compressing bass and snare I set the attack and release by listening for how long I want the "punch" to be, so that the transient is let through the compressor unaffected and then the decay is compressed. It's best to do this by ear, but the gauge can be helpful - a faster attack will fling the needle around when the snare is hit, but with a slower attack it won't budge until the transient has long past and might kinda look and sound like it's not doing anything.
Depending on how dense the mix is or how punchy I want it to be, I will also use sidechain compression the bass guitar, cued off the kick, where again I set the attack and release by listening for how long the transient should be. "How long the transient should be" is a question for your ears, but basically, when is the "thump" over? This allows the kick drum to get the big "thump" to start the beat, and then the bass guitar holds the note. I might use the same approach on the guitar bus with sidechain compression triggered from the snare, so that the guitars duck out of the way of the snare transient and they don't fight for frequency space. You want a quick release here so that the guitars aren't fading in and out - just get the hit of the snare and then get them back up to volume.
Finally, if there is a silence followed by a big transient (maybe a big crash cymbal), I like to lead in with some of the preamp hiss or room noise or something to alert the listener that something is coming - I'm not into jump scares in my music lol.
This all applies my music which is like indie rock / big loud distorted guitars stuff. I like the sound of the kick and snare cutting through dramatically to drive the song. In more natural-sounding genres (like a live jazz set), this is all probably overkill.