A square operation creates an unmodulated tone for a BPSK signal at 2x the carrier frequency (if the signal was unfiltered, but produces a strong carrier with weaker sidebands in the more typical filtered or pulse-shaped cases). For QPSK signals (including OQPSK) a fourth law operation is required which produces the same at 4x the carrier frequency.

This can be explained by knowing that multiplying signals causes their phases to add. So a signal multiplied by itself (square) that is modulated 0° to 180° would then become 0° to 360° which is the same as 0° (unmodulated). For QPSK the states are 0°, 90°, 180° and 270° where it can be seen that multiplying any of those phases by 4 results in 0°.

In typical approaches a PLL operation then tracks the recovered 4x carrier in order to clean up the residual (much lower) sidebands resulting from the finite bandwidth modulated signal and then the PLL-filtered signal is frequency divided to complete the carrier recovery.

I tend not to use this approach given the higher sampling frequency required and the comparative complexity to other methods. I detail another approach for carrier recovery specific to BPSK, QPSK and QAM that would be in my opinion much more efficient for a digital radio implementation in this post: https://dsp.stackexchange.com/questions/17297/high-modulation-index-psk-carrier-recovery/38017#38017

This is also an interesting approach by fred harris for a frequency lock loop that I believe would work for QPSK carrier acquisition with additional subsequent phase tracking: https://dsp.stackexchange.com/questions/42239/how-does-this-fll-work/52163#52163