Series Solution

Off[General::spell];
Off[General::spell1];; ClearAll["Global`*"]

(x^2) - 
          x (1 + y[x]^2) + (Exp[y[x]] + 2  y[x] - 1) = 0; 
      y[0] = 0

eq = 
      (x^2) - x (1 + y[x]^2) + (Exp[y[x]] + 2  y[x] - 1)

n=4;a[0]=0;series1=Collect[Simplify[Series[eq/.{y->(Sum[a[m] #^(m),{m,0,n}]&)},{x,0,n}]]//Normal//PowerExpand,θ]

sol1 = SolveAlways[series1 == 0, x]

y[x] /. {y[x] -> Sum[a[m] x^(m), {m, 0, n}] /. 
          sol1[[1]]}

y1[x] = y'[
            x] /. {y[x] -> Sum[a[m] x^(m), {m, 0, n}]} /. 
        sol1[[1]]

y2[x] = y'[
            x] /. {y -> (Sum[a[m] #^(m), {m, 0, n}] &)} /. 
        sol1[[1]]