Counterexample: We define the two form \(\omega\) on \(S^2\) by
\(\omega_x(v,w):=x\cdot(v\times w),\quad\forall x\in S^2,\,v,w\in T_xS^2,\)
where \(\cdot\) denotes the Euclidean product in \(\mathbb{R}^3\) and \(\times\) denotes the cross product (vector product) in \(\mathbb{R}^3\). The exterior derivative \(d\omega\) is a 3-form on \(S^2\). Since \(S^2\) is 2-dimensional, \(d\omega\) vanishes, i.e., \(\omega\) is closed.
The form \(\omega\) does not vanish anywhere. Hence it is a volume form. Therefore, its integral over \(S^2\) does not vanish. (Here we equip \(S^2\) with the orientation induced by \(\omega\).) Using Stokes' Theorem, it follows that \(\omega\) is not exact. (Why?)
By the way, \(\omega\) is a symplectic form, i.e., a closed and nondegenerate two-form. In this course we will explain the second condition and investigate such forms.