Is there a way to put a player sprite above other sprites?

The z index of a sprite is used to determine the order in which they are drawn - so if you want to show one sprite above others, just give it a positive z index (sprites are typically created at z == 0, and so as @randomuser mentioned it will then render in the order they are created).

Here’s the documentation page for reference: https://arcade.makecode.com/reference/sprites/sprite/z