It looks different in the preview because in Material Preview Shading there is an HDRI already set up for convenience, but that HDRI is not used for Render Shading.
How to use an HDR image as environment.
In the world section, set the surface to Background, assign an Environment Texture to the color slot and then select any HDRI image you want to use:
Enable Scene Lights and Scene World to override the viewport settings:
Gif from: How can I render an object with an hdr background?