A deadball slam mirrors a squat pattern more. Meaning you are gonna drop your hips down towards the ground and drive your knees out to pick the ball up from the floor. Think of it like a squat adding in a weight you can pick up and throw.
A medball slam mirrors a hip hinge pattern. Meaning you are just pushing your hips back behind you as you bring your torso down to face the ground and catch the medball. You want to extend on your toes reaching up tall, then explode your arms down with the ball and push your hips back past your heels. Catch and repeat.
Deadball slams are a great conditioning exercise as you can get a lot of reps in challenging the body with added resistance.
Medball slams are a great exercise to help develop power! As you want to generate as much force and speed as possible when you throw that medball.
Either one is great and is also good at letting out some steam as it’s fun to throw stuff as hard as you can.