ClearAll["Global`*"](*clear any previously user-defined variables*)

make sure “Dynamic Updating Enabled” setting is checked in “Evaluation” menu of Mathematica
set the potential to whatever you want
note: the x-range should extend well past classical turning points, i.e. the min and max values  at which  ℰmax=U(x)
visually check this by inspecting the next figure below

U[x_]=If[Abs[x]<3,-10,0];
{xmin,xmax}={-15,15};
ℰmax=-.1;
Plot[{U[x],ℰmax},{x,xmin,xmax},PlotRange->All]

here is the Phase Plot

Manipulate[(Ω=0;soln= NDSolve[{Φ''[x] +2(ℰ-U[x])Φ[x]==0,Φ[xmin]==.1,Φ'[xmin]==.1,WhenEvent[Φ[x]==0,Ω++]},Φ[x],{x,xmin,xmax}][[1]]//Quiet;
Plot[Tanh[Φ[x]/.soln],{x,xmin,xmax},PlotRange->{-1.05,1.05},PlotPoints->200,PlotLabel->("Phase Plot:  "<>"ℰ="<>ToString[ℰ]<>"   Ω="<>ToString[Ω])]),
{{ℰ,ℰmax,"  Move the ℰ slider \[Implies]\n bound states appear\nand are counted as Ω"},-10.,ℰmax}]