In Unity2D, how do I keep a sprite on top of another sprite dynamically?

I have a board that has two types of gameobjects. A sprite which is an image of a square at a certain position, and a sprite of an image that goes on top of the square. How do I make it so that the sprites are always in the correct layered positions? Right now it’s pretty random what order they will appear in.

All the squares in the images below should have numbers on them. I know the numbers are there because I checked by disabling the square sprite.


Never mind, I figured it out. It’s the z in the position vector.