Runtime object to the front

Hello, I am new to unity and I’ve been working on 2d game for a week. Now I found this problem, the sprite in runtime object isn’t appearing on front. I’ve been trying to solve but I couldn’t so Kindly help me with this.

You can decide which sprite goes to the front with the “Order in Layer” value found in Sprite Renderer component. The sprite with a higher value will be in front of the one with a lower value.

myGameObject.GetComponent().sortingOrder = 5;