I used to play Sicilian Najdorf a couple of years ago and I used to get positions like this one:
[FEN ""] 1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6 6.Be3 e5 7.Nb3 Be6 8.f3 Be7 9.Qd2 Nbd7 10.O-O-O O-O 11.g4 b5
In this sicilian position opposite side castling happened and pawn storm is the way to go. However, nowadays, I play the Caro Kann, and when opposite side castling happen in certain lines like the one shown below, according to stockfish, pawn storm is not the way to proceed. Piece pressure and play on the queenside is the way to go
[FEN ""] 1.e4 c6 2.Nf3 d5 3.exd5 cxd5 4.d4 Bg4 5.h3 Bxf3 6.Qxf3 e6 7.Nc3 Nc6 8.Be3 Nf6 9.Bb5 Bd6 10.O-O-O Rc8 11.g4 Qa5 12.g5 Nd7 13.h4 O-O! 14.Kb1 Nb4! 15.Bxd7 Rxc3!
Or this position
[FEN ""] 1.e4 c6 2.Nc3 d5 3.Nf3 dxe4 4.Nxe4 Nf6 5.Nxf6+ exf6 6.d4 Bd6 7.Be3 O-O 8.Qd2 Re8 9. O-O-O Be6 10.Kb1 Na6 11.c4 Nb4 12.Rc1 Bf5+ 13.Ka1 a5 14.a3 Qe7! 15.c5 Bc7
My question is: If you're out of book, how do you determine if pawn storm or piece play is better in an opposite side castling position?