Slider not showing up in game view

So I got this slider. It has no functionality yet apart from just appearing on the screen. It works just fine in the scene view, but doesn’t appear in the game view.

Scene view:

Game view:

Anyone know what’s happening?

I’ve found what the issue was!
I had a Cinemachine camera following the player so I think that’s why my problem was different. On the canvas you need to change the render mode to screen space camera, and then drag the main camera into it. And finally my slider appeared on the screen and stuck in the same place on the screen even when I walked.