Out of the two given options, Head Smash is better in a competitive scenario
Let's take a look at both;
Head Smash - 150 Power, 80 Accuracy, recoil is 50% of the damage you dealt.
Rock Wrecker - 150 Power, 90 Accuracy, recharge turn.
So why would I support Head Smash?
As a general rule, moves that force you to recharge (Hyper Beam, Blast Burn, Frenzy Plant etc.) are not viable in a competitive scenario. It means you lose momentum on that recharge turn, and furthermore potentially give your opponent a free turn to set up, allowing them to possibly sweep through your team. While Head Smash vasly reduces the longevity of your own Pokemon it gives your opponent less chances to sweep through your overall team compared to Rock Wrecker.
If this is in-game, choose Rock Wrecker. In-game allows you to change Pokemon provided you KO them, so using Rock Wrecker as a finisher is fine, as you can switch out with no repercussions due to the in-game battling system.
However if you have a choice, use Stone Edge or Rock Slide. While both are weaker, they lack the bad side effects from Rock Wrecker and Head Smash
Please note that no Pokemon can learn Rock Wrecker and Head Smash, so this answer is hypothetical and has no real bearing