A Question on $p$-groups. Suppose $G$ is a group with order $p^{n}$ ($p$ is a prime).
Do we know when we can find the subgroups of $G$ of order $p^{2}, p^{3}, \cdots, p^{n-1}$?

(Approach modified in light of Don Antonio's comment below question). Another way to proceed, which may not be so common in textbooks, and which produces a normal subgroup of each possible index, is as follows. Suppose we have a non-trivial normal subgroup $Q$ of $P$ (possibly $Q = P$). We will produce a normal subgroup $R$ of $P$ with $[Q:R] = p.$ Note that $P$ permutes the maximal subgroups of $Q$ by conjugation. Let $\Phi(Q)$ denote the intersection of the maximal subgroups of $Q$, and suppose that $[Q:\Phi(Q)] = p^{s}.$ Then $Q/\Phi(Q)$ is Abelian of exponent $p$. All its maximal subgroups have index $p,$ and there are $\frac{p^{s}-1}{p-1}$ of them. There is  bijection between the set of maximal subgroups of $Q$ and the set of maximal subgroups of $Q/\Phi(Q).$ Hence the number of maximal subgroups of $Q$ is $1 + p + \ldots + p^{s-1},$ which is congruent to $1$ (mod $p$), and each of them has index $p$ in $Q$. The maximal subgroups of $Q$ are permuted under conjugation by $P$ in orbits of $p$-power lengths.
At least one orbit must have length $1$. This orbit contains a subgroup $R$ of $Q$ with $[Q:R]= p$ and $x^{-1}Rx = R$ for all $x \in P.$ In other words, we have found a normal subgroup $R$ of $P$ which is contained in $Q$ and satisfies $[Q:R] = p .$
