NestList[f,x0,5]

{Sin[5],Sin[5.]}

{Head[5.],Head[5],Head["5"],Head[5+5I],Head[{1,1}]}

Remove["Global`*"]//Quiet;
derivative[{t_,y_}]:=((-y)/(1+t));
tStart=0.;
tEnd=20;
yStart=10;
nSteps=300;
Δt=((tEnd-tStart)/nSteps);
step[point:{t_,y_}]:={t+Δt,y+Δt*derivative[point]};
solution=NestList[step,{tStart,yStart},nSteps];
pltEuler=ListPlot[solution,PlotRange->All,PlotStyle->{PointSize[0.01],Red}];

SolutionbyDSolve=y[t]/.DSolve[{D[y[t],t]==((-y[t])/(t+1)),y[0]==10},y[t],t][[1]];

pltDsolve=Plot[SolutionbyDSolve,{t,0,20},PlotRange->Full];

Show[pltDsolve,pltEuler]

?y

DSolve[{D[y[t],t]==((-y[t])/(t+1)),y[0]==10},y[t],t]