This is not a problem of render settings. You do not offer any information how the objects are created, but the grey object looks like you are using one or more Displace modifiers on it to get its structure.
Now I would reckon you are also using a Subdivision Surface modifier to get a higher resolution for the displacement.
The problem is, the Subdivsion Surface modifier has two different Levels values, one for Viewport and one for Render. By default, the value for Render is set to 2, and when you increase the Viewport resolution it does not automatically change the Render resolution.
So while everything looks good and detailed in the viewport, as soon as you render it Blender uses the lower resolution and so the displacement does not work as expected.
Here is an example with a displaced landscape, the Levels Viewport value is set to 6, Render is at the default 2. This is how it looks in the viewport:

But this is how the final render looks with only 2 levels of subdivsion:

If you now increase the Render value to 6 as well, the result looks like expected from the viewport:

The usual workflow is to intentionally set the Levels Viewport to a lower level for better performance while working in the scene and setting a higher value for Render to get a better resolution for the final render.
But it also depends on what you are doing further. If you plan to apply the Subdivision Surface modifier for example to permanently increase the mesh resolution, you do not have to change the Render levels. Applying the modifier will use the value which is set for the Viewport.