Let $G$ be a finite group, $A$ some coefficients (e.g. $A = \mathbb{F}_2$ or $\mathbb{Z}$), and write $\mathrm{H}^\bullet_{\mathrm{gp}}(G; A)$ for the (ordinary) group cohomology of $G$ with coefficients in $A$. Recall that a class $\alpha \in \mathrm{H}^\bullet_{\mathrm{gp}}(G; A)$ is *essential* if it is nonzero, but the restriction $\alpha|_S \in \mathrm{H}^\bullet_{\mathrm{gp}}(S; A)$ is zero for *all* proper subgroups $S \subsetneq G$. For example, a standard lemma shows that $G$ has no essential cohomology if $G$ is not a $p$-group for some prime $p$ (as the collection of Sylow $p$-subgroups together detect all cohomology). On the other hand, for a cyclic group of prime order, all classes are essential, just because the group has no subgroups.

General question:Which groups have essential cohomologyof low degree?

The question is basically trivial in degree $1$. Indeed, $\mathrm{H}^1_{\mathrm{gp}}(G; A) = \hom(G, A)$, and a nonzero homomorphism takes a nonzero value on some element, so the only groups with essential cohomology in degree $1$ are cyclic (and these do have essential cohomology). Moreover, it's approximately true that an abelian group has essential cohomology of degree $d$ when it has rank $d$; compare Which groups have undetectable third U(1)-cohomology?.

Specific question:Which groups have essential classes in $\mathrm{H}^2_{\mathrm{gp}}(-; \mathbb{F}_2)$?