How do I make a rocket explode on impact with c#?

I am still learning c# and i’m wondering how do you make something explode on impact with c#?

Use triggers or colliders?

Then you can play an animation and destroy the rocket.