The second image is in my Rocket blueprint (player). Pretty much empty but so far I though to add functionality when the Capsule of my pawn would overlap with any walls, triggering an explosion.
Rather than having an overlap on the pawn that kills the rocket on overlap, you could make it so that the obstacles/enemies apply damage to the rocket when it overlaps with their collision.
What you need to do here is cast the “OtherActor” to something in order to differentiate it from pickups. Preferably your obstacles are instances (or childs) of a shared class “BP_Obstacle” for example.
Then draw a cast to BP_Obstacle from the “OtherActor” pin and only if the cast succeeds, you explode the rocket.
(Or you do this in the BP_Obstacle Overlap event like KalemRose suggested)
If they don’t share a class you could try turning this around, for example if you overlap things that are not pickups (eg. cast to pickup fails) you consider them an obstacle.
Lastly you could also use custom collision channels.