$\newcommand\vpi\varphi\newcommand\ep\varepsilon\newcommand\R{\Bbb R}$What you "need to show" is of course false in general. E.g., suppose that $d=1$ and $\varphi=1_{[0,1]}$. Then your set of measures, say $M_\vpi(C)$, is not compact even in the topology of weak convergence, since the the sequence of the uniform distributions over the intervals $[n,n+1]$ for natural $n$ is not tight.
If $\vpi\ge0$ and $\vpi(x)\to\infty$ as $|x|\to\infty$, then the set $M_\vpi(C)$ will be compact in the topology of weak convergence, because it will be tight; here $|x|$ is the Eucldean norm of $x$. Indeed, for each real $\ep>0$, let $r_\ep>0$ be a real number such that $\vpi(x)\ge C/\ep$ if $x$ is not in the closed ball $K_\ep:=B_{r_\ep}$ in $\R^d$ of radius $r_\ep$ centered at the origin. Then for each $\mu\in M_\vpi(C)$ we have $$C\ge\int_{\R\setminus K_\ep}\vpi\,d\mu\ge\frac C\ep\,\mu(\R\setminus K_\ep)$$$$C\ge\int_{\R^d\setminus K_\ep}\vpi\,d\mu\ge\frac C\ep\,\mu(\R^d\setminus K_\ep)$$ and hence $\mu(\R\setminus K_\ep)\le\ep$$\mu(\R^d\setminus K_\ep)\le\ep$. $\quad\Box$
On the other hand, for any real-valued measurable function $\vpi$ whatsoever and some real $C=C_\vpi>0$, the set $M_\vpi(C)$ will not be compact wrt to the TV metric. Indeed, take any real $C=C_\vpi>\text{essinf}\,\vpi$, where $\text{essinf}\,\vpi\in[-\infty,\infty)$ is the essential infimum of $\vpi$. Then the Lebesgue measure of $D:=\{x\in\R^d\colon\vpi(x)\le C\}$ is $>0$. So, we can find countably many pairwise disjoint subsets $D_1,D_2,\dots$ of $D$ each of finite Lebesgue measure $>0$ such that $\vpi$ is bounded from below on each $D_i$. Let $\mu_1,\mu_2,\dots$ be the uniform distributions over the respective sets $D_1,D_2,\dots$. Then for each natural $i$ we have $$\int_{\R^d}\vpi\,d\mu_i=\int_{D_i}\vpi\,d\mu_i\le \int_{D_i} C\,d\mu_i=C,$$ so that $\mu_i\in M_\vpi(C)$. Note next that for any distinct natural $i$ and $j$, the TV distance between $\mu_i$ and $\mu_j$ is $1$. So, the set $M_\vpi(C)$ is not totally bounded wrt the TV metric and therefore not compact wrt to the TV metric. $\quad\Box$
Remark: Here we of course had to say "some real $C=C_\vpi>0$". Indeed, if $C<\text{essinf}\,\vpi$, then the set $M_\vpi(C)$ is empty and hence compact wrt to any topology.