It’s a good question and one that comes up seemingly frequently (see other threads).
In a multi-crew operation with high rates of climb, the consensus appears to be “when cleared to a flight level and above acceleration altitude”. In any case, the standby altimeter can remain on QNH until above MSA and Trans Alt.
In a slow climber, without a standby, maybe there would be more chance of getting a revised clearance to stop at an altitude and thus it might be better to wait until Trans Alt.