An example for this would be my Incineroar taking down Necrozma. Since Incineroar is immune to Necrozma's Prismatic Laser (the most powerful, non "Z-move" Psychic-type move in the game) and I used Incineroar's Darkest Lariat / Leech Life move(s) to defeat it.