Welcome new contributor. Your post still has typos, so it is not completely clear what you mean. However, my best guess of your meaning has a negative answer. The simplest examples have $X_0$ a smooth projective curve of genus $g=2$ or a non-hyperelliptic curve of genus $g>2$. This follows from the proof (rather than the statement) of the infinitesimal Torelli theorem for nonhyperelliptic, smooth, projective curves $X_0$ of genus $g> 2$.
Denote by $D$ the $k$-algebra $k[t]/\langle t^2\rangle$. Thus, the $k$-vector space $\Omega_{D/k}$ is $1$-dimensional. The sheaf of relative differentials $\Omega_{X/k}$ is a coherent $\mathcal{O}_X$-module. By functoriality / transitivity for differentials, for every $k$-morphism $f:X\to Y_0$, there are induced morphisms of $k$-vector spaces, $$H^0(Y_0,\Omega_{Y_0/k}) \to H^0(X,\Omega_{X/k}) \to H^0(X_0,\Omega_{X_0/k}).$$ Thus, if there exists $f$ and $\beta$ as you state, then there exists a section $f^*\beta\in H^0(X,\Omega_{X/k})$ such that the image in $H^0(X_0,\Omega_{X_0/k})$ equals $\alpha$. To understand this better, consider the short exact sequence of locally free $\mathcal{O}_{X_0}$-modules,
$$0 \to \Omega_{D/k}\otimes_k \mathcal{O}_{X_0} \to \Omega_{X/k}\otimes_D (D/tD) \to \Omega_{X_0/k} \to 0.$$ The long exact sequence of cohomology gives a connecting map
$$
\alpha(\xi):H^0(X_0,\Omega_{X_0/k}) \to \Omega_{D/k}\otimes_k H^1(X_0,\mathcal{O}_{X_0}).
$$
Now assume that the Kuranishi map of $X/S$ is nonzero, $$\kappa:k \to \text{Ext}^1_{\mathcal{O}_{X_0}}(\Omega_{X_0/k},\mathcal{O}_{X_0}).$$ Also assume that the Torelli map is an immersion at $X_0$. This holds if $X_0$ has genus $g=2$ or if $X_0$ is a non-hyperelliptic curve of genus $g>2$. Then it follows by the proof of the infinitesimal Torelli theorem that there exists $\alpha\in H^0(X_0,\Omega_{X_0/k})$ that does not lift to a global section in $H^0(X,\Omega_{X/S})$. For instance, confer Corollary 1.9, p. 8 of the following.
Chris Peters.
Lectures on Torelli Theorems. Spring School Rennes 2014.
https://www.lebesgue.fr/sites/default/files/attach/hodge-peters.pdf