I started modeling with blender through a Tutorial from CG Fast Track, where u learn by also modeling a sword.
When I finished the part with putting textures and shaders on my sword I noticed that when I look at it in Layout mode, it just looks all grey and partly transparent.
Thatโs because the HDRI in the Material Preview shading mode is just a preview for look development.
The rendering uses the actual lights and world of your scene.
To preview the actual scene lighting to see the how itโs going to be rendered, you have to set the viewport shading to the most right option Rendered.
To get a similar look to your preview when actually rendering, add an HDRI as the environment texture of your world.
You can find a lot of HDRIs, including the ones that are used for the material preview in Blender, for free on hdrihaven.com.