Let $X$ be an $n$-dimensional connected smooth manifold, and let $X_0$ be an embedded $(n-2)$-dimensional compact submanifold of $X$ with the trivial normal bundle. How do we get inclusion?
$$X_0\times S^1\hookrightarrow X-X_0$$
and show that it is actually a homotopy equivalence?
Could you please give me some help with the details? Thanks

In your comment you consider a small neighborhood $U$ of $X_0$ containing $X_0$. The regular neighborhood theorem says that there exists such a neighborhood $U$ together with a homeomorphism of pairs $(U,X_0) \mapsto (N,S)$ where $N$ is the normal bundle and $S$ is the zero section of $N$. By your hypothesis that $N$ is trivial and that $X_0$ has codimension 2, we obtain a homeomorphism $(N,S) \approx (X_0 \times \mathbb R^2,X_0 \times \{0\})$. Removing $X_0$ from $U$ and $S$ from $N$ we obtain a chain of homeomorphisms $$U-X_0 \mapsto N-S \mapsto X_0 \times (\mathbb R^2 - \{0\}) $$ and the last term in this chain is evidently homotopy equivalent to $X_0 \times S^1$.
However, notice that this only gives a homotopy equivalence with $U-X_0$, not with $X-X_0$. It is entirely unnatural to expect a homotopy equivalence with $X-X_0$, and you might well even know counterexamples of this already. The case of a single point $X_0$ in almost any 2-manifold $X$ is a particularly trivial counterexample. For a slightly less trivial counterexample, consider $X_0 \subset S^3$ to be an ordinary unknotted circle, so $\pi_1(S^3-X_0) \approx \mathbb Z$ is infinite cyclic whereas $\pi_1(X_0 \times S^1) \approx \pi_1(S^1 \times S^1) \approx \mathbb Z^2$.