Blender 2.91 Cycles: Why is the render result different from the viewport rendered view?
It seems like some of your rock visibilities are disabled in the Outliner. Click on the funnel icon and click on the camera icon to display the Disable in Renders option: