W[x_]:=If[Abs[x]<1,0,5];
Plot[W[x],{x,-5,5},Filling->{1->0},PlotLabel->W,ImageSize->Medium]

pfun=ParametricNDSolveValue[{-y''[x]+W[x]y[x] ==λ y[x],y[0]==1,y'[0]==0},y,{x,-50,50},{λ}];
Plot[Evaluate@Table[pfun[λ][x],{λ,0,5,1}],{x,-2,2},ImageSize->Medium]

Plot[pfun[λ][5],{λ,0,13},ImageSize->Medium]

val=Map[FindRoot[pfun[λ][5],{λ,#}]&,{-2}]

Show[Plot[Evaluate@Table[pfun[λ][x],{λ,1,3,.1}],{x,-6,6},PlotRange->{-1,1},PlotStyle->Lighter[Gray,.5]],Plot[Evaluate[pfun[λ][x]/.val],{x,-6,6},PlotStyle->Thick],ImageSize->Medium]