The first Stiefel–Whitney class of a vector bundle is an element in the first cohomology group of the base space. Namely, the first Stiefel–Whitney class for a vector bundle $E$ over a $d$-dimensional manifold $M^d$ is called $w_1(E) \in H^1(M^d;\mathbb{Z}/2\mathbb{Z})$.

The Majorana modes are certain "fermions" whose creation and annihilation operators are the same $\hat{\gamma}=\hat{\gamma}^\dagger$.

For physical reasons, in the context of 2+1 dimensional $p \pm ip$ superconductors, people have a vague impression that Majorana zero modes in the 2+1 dimensional space-time may be related a nontrivial generator in the cohomology group $H^1(\mathbb{Z}/2\mathbb{Z};\mathbb{Z}/2\mathbb{Z})$, where the first $\mathbb{Z}/2\mathbb{Z}$ can be viewed as $\mathbb{Z}/2\mathbb{Z}$-gauge fields, and the second $\mathbb{Z}/2\mathbb{Z}$ has something to do with the orientation of manifold. This may be similar to the context of the first Stiefel–Whitney class, that has something to do with the orientability of the based manifold.

In contrast, the second Stiefel–Whitney class $w_2(E) \in H^2(M^d;\mathbb{Z}/2\mathbb{Z})$ has something to do with the spin structure of the bundle $E$, which is suitable for defining spinors, including the Dirac spinors. Naively, the Dirac (complex) fermion is a pair of Majorana (real) fermions, say in 2+1 dimensional spacetime.

A side remark is that $H^1(\mathbb{Z}/2\mathbb{Z};\mathbb{Z}/2\mathbb{Z})$ also occurs in the calculation of the 3rd spin bordism group $\Omega_3^{Spin}(B \mathbb{Z}/2\mathbb{Z})$ for the classifying space $B \mathbb{Z}/2\mathbb{Z}$.

So, my question is the following.

In mathematics (references/literature are welcome), do the following objects appear in a unified context?

Majorana modes/fermions;

the first Stiefel—Whitney classes $w_1(E) \in H^1(M^d;\mathbb{Z}/2\mathbb{Z})$;

the cohomology group $H^1(\mathbb{Z}/2\mathbb{Z};\mathbb{Z}/2\mathbb{Z})$.

What are the math principles and structures behind?