Degree of an ode is the degree of the highest derivative in the oder. This needs a helper function
(*This function thanks to Carl Woll, see https://mathematica.stackexchange.com/questions/151850/using-cases-and-when-to-make-input-a-list-or-not*) Clear["Global`*"]; getPatterns[expr_, pat_] := Last@Reap[expr /. a : pat :> Sow[a], _, Sequence @@ #2 &];
And now do
getDegreeOfOde[ode_,y_,x_]:=Module[{maxDer,p,d,der}, der = getPatterns[ode,Power[Derivative[_.][y][x],_.]] ; p = Flatten[Internal`ProcessEquations`DifferentialOrder[#,{x},{y}]&/@der]; maxDer = Extract[der,Position[p,Max[p]]]; Abs[First[maxDer/.(Derivative[_.][y][x])^(d_.):>d]] ]
Examples of usage
ode=y'''[x]+y''[x]^4+3*y'[x]^8+3*y[x]^8==0; getDegreeOfOde[ode,y,x] (*1*) ode=y''[x]^4+3*y'[x]^8+3*y[x]^8==0; getDegreeOfOde[ode,y,x] (*4*) ode=y''[x]+3*y'[x]^8+3*y[x]^8==0; getDegreeOfOde[ode,y,x] (*1*)