Examples with zero first Stiefel-Whitney class and nonzero second Stiefel-Whitney class
Consider $T\mathbb{CP}^k$, the tangent bundle of $\mathbb{CP}^k$. I claim it satisfies the desired conditions if and only if $k$ is even, in particular, $T\mathbb{CP}^2$ is an example.
There are several ways to see that $w_1(T\mathbb{CP}^k) = 0$ for every $k$:
- as $T\mathbb{CP}^k$ is a complex bundle, its odd Stiefel-Whitney numbers are zero, in particular $w_1(T\mathbb{CP}^k) = 0$;
- every complex vector bundle is orientable so $w_1(T\mathbb{CP}^k) = 0$; and
- $\mathbb{CP}^k$ is simply connected so $H^1(\mathbb{CP}^k; \mathbb{Z}_2) = 0$.
As for the condition that the second Stiefel-Whitney class be non-zero, we will need the restriction that $k$ is even. To see this, recall that $c(T\mathbb{CP}^k) = (1 + \alpha)^{k+1}$, so $c_1(T\mathbb{CP}^k) = \binom{k+1}{1}\alpha = (k + 1)\alpha$, and hence $w_2(T\mathbb{CP}^k) = (k + 1)\bar{\alpha}$ where $\bar{\alpha}$ is the image of $\alpha$ under the natural map $H^2(\mathbb{CP}^k; \mathbb{Z}) \to H^2(\mathbb{CP}^k; \mathbb{Z}_2)$ induced by the reduction modulo $2$ map $\mathbb{Z} \to \mathbb{Z}_2$. As $\alpha$ is a generator for $H^2(\mathbb{CP}^k; \mathbb{Z})$, it is not divisible by two, so $\bar{\alpha} \neq 0$. Therefore, $w_2(T\mathbb{CP}^k) = (k + 1)\bar{a}$ is non-zero if and only if $k$ is even.
Since you said in comments that you were interested in general vector bundles, we can lower the dimension from Michael's answer.
Consider the tautological complex line bundle over $S^2 = \mathbb{C}P^1$. That is, thinking of $\mathbb{C}P^1$ as the set of complex lines through the origin in $\mathbb{C}^2$, the vector bundle is $E = \{(p,v)\in \mathbb{C}P^1\times \mathbb{C}^2: v\in p\}$. The projection map is simply projection onto the first factor.
(This is the analogue of the Mobious bundle over $S^1\cong\mathbb{R}P^1$. Alternatively, one can think about it by taking the universal complex line bundle over $\mathbb{C}P^\infty$ and then pulling back via the inclusion of the $2$-skeleton $S^2\rightarrow \mathbb{C}P^\infty$.)
Of course, $w_1(E) = 0$ since $H^1(S^2;\mathbb{Z}/2\mathbb{Z}) = 0$. For $w_2$, we note that the first Chern class, which is well known to equal the Euler class, is given by a generator of $H^2(S^2;\mathbb{Z})$. But the mod 2 reduction of the Euler class is the top Stiefel-Whitney class, so $w_2(E)\neq 0 \in \mathbb{Z}/2\mathbb{Z}\cong H^2(S^2;\mathbb{Z}/2\mathbb{Z})$.