ysol = NDSolveValue[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1},
y[x], {x, 0, 30}]
xdata = Table[xx, {xx, 0, 30}];
ydata = Table[ysol /. x -> xx, {xx, 0, 30}];
output = Transpose[{xdata, ydata}];
output // TableForm

Edit: to output the data you can save the notebook to some path. The following will create a file in that path.
SetDirectory@NotebookDirectory[]
Export["myFile.mx", Transpose[{xdata, ydata}]]
and then you can import
Import["myFile.mx"]
Edit: pertaining to WorkingPrecision
ysol = NDSolveValue[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1},
y, {x, 0, 30}, WorkingPrecision -> 100,
Method -> "StiffnessSwitching", MaxSteps -> 10^6]
And now you can check the value of the function at $x=30$ for example -it works in the same way for the other values
ysol[x] /. x -> 30

NDSolveValuewill use machine precision calculations. To use arbitrary-precision, specify aWorkingPrecision, i.e., add the optionWorkingPrecision -> 20where the20is set to whatever required precision. – Bob Hanlon Apr 09 '22 at 13:03