These are quite complete notes on finite $p$-groups https://mat.unb.br/~matcont/20_3.pdf You should be able to find the claim in Section 2.1.