Let me do details for the first integral. Let $u_n(x) = \frac{1-e^{-x}}{x^n}$. Notice that $u_n(x)\sim x^{1-n}$ when $x\to 0$, and $u_n(x)\sim x^{-n}$ when $x\to \infty$. Therefore, $u_n$ is only integrable for $1 < n < 2$.
Hence, assume that $n\in(1,2)$. Then it follows by integration by parts that
$$
U_n := \int_0^\infty u_n(x)\,\mathrm d x = \left[\frac{x^{1-n}}{1-n}(1-e^{-x})\right]_0^\infty - \int_0^\infty \frac{x^{1-n}}{1-n} e^{-x}\,\mathrm d x
\\
= 0 + \frac{1}{n-1} \int_0^\infty x^{1-n}\, e^{-x}\,\mathrm d x = \frac{\Gamma(2-n)}{n-1}
$$
Now notice that $U_n$ is an analytic function of $n$. On the other side, for any $n>0$, the relation $\Gamma(n+1) = n\,\Gamma(n)$ holds. The definition of $\Gamma$ for other $n\in\Bbb C\setminus \{0, -1, -2,\dots\}$ is that $\Gamma$ is the unique analytic continuation of the function defined on $\Bbb R_+$. In particular, $\Gamma(n+1)$ and $n\,\Gamma(n)$ are both analytic functions. Since they are equal on $\Bbb R_+$, they are also equal on all $\Bbb C\setminus \{-1, -2,\dots\}$ and so
$$
U_n = \frac{\Gamma(1-n+1)}{n-1} = \frac{(1-n)\,\Gamma(1-n)}{n-1} = -\Gamma(1-n).
$$
For the second integrals, things are similar, but you have to deal with complex numbers. First, with the same integration by parts as before
$$
V_n := \int_0^\infty \frac{1-\cos(x)}{x^n}\,\mathrm d x = \frac{1}{2}\left(\int_0^\infty\frac{1-e^{ix}}{x^n}\,\mathrm d x + \int_0^\infty \frac{1-e^{-ix}}{x^n}\,\mathrm d x\right)
\\
= \frac{i}{2(n-1)}\left(\int_0^\infty x^{1-n}\,(e^{ix}-e^{-ix})\,\mathrm d x\right) = \frac{-1}{(n-1)}\,\Im\left(\int_0^\infty x^{1-n}\,e^{ix}\,\mathrm d x\right)
$$
Now one can use the fact that $\int_0^\infty x^{k-1}\,e^{-ix}\,\mathrm d x = i^{-k}\,\Gamma(k)$ (i.e., all works as if we can do the normal change of variable, even if $i$ is a complex number). This is proved for instance here using the Fourier transform Can we find a closed form for this integral?
Hence using again $\Gamma(2-n) = (1-n)\,\Gamma(1-n)$
$$
V_n = \frac{-1}{n-1} \Im(i^{n-2})\, \Gamma(2-n)) = \Im(i^{n-2})\, \Gamma(1-n)
$$
Hence
$$
V_n = -\sin(n\pi/2)\, \Gamma(1-n)
$$