I think you played it right
you can also 4-bet pf and get all-in if you want to stack off QQ as overpair postflop
Reasons for that is that you always get all-in against KK/AA postflop. And if he is 3-betting for value and shoving TT+/AK then you gain a lot of equity just getting money all-in pre-flop and you do0n´t have to worry seeing K or A on the flop
There are some reason just to call 3-bet oop to keep in his weaker hands, like AJ/KQ that he might 3-bet for value but then fold if you 4-bet but generally I´d prefer just 4-betting pf and get all-in with QQ