Your issue is in Start()
you are trying to get the component GameObject, which does not exist. You already have the GameObject references and GameObjects do not have components GameObjects. A Component is a piece of a GameObject but a GameObject can not have GameObject Component.
If you remove your current Start()
function the object should not disappear when you hit Play.
You only need to use the GetComponent method when you are trying to get a Component on an object you have a reference to. For instance, if you wanted to get a reference to the Sprite Render
on your gameobject and did not want to make a public variable, you can get that reference by using GetComponent<SpriteRenderer>()
.
If you are still confused about the overall concept of the Component to GameObject relationship, you can check out the official docs or another useful Unity post.