How do I transfer a gameobject created in one scene to another scene AND use it in a c# script?

I want to use a GameObject I have created in my first scene in a script of an object in another scene, at the moment I transfer the object using the function dontdestroyonload. Can someone help me with this problem, I did not find anything online.

Create a prefab of the object, instantiate when needed or simply drag the prefab into the scene.