I have trouble making the player collide with the map

Hi everyone! I’m making my first 3D Unity game and I’m having trouble restricting the player’s movement inside the playable field (tunnel).

I also have a slider (it’s not in the video) that decreases constantly (it measures the bird’s thirst) but i can’t seem to restart it’s value when the player (bird) collides with the water puddles (a circular collider on top of them).

I imagine i can use the same logic of the puddles script to decrease the thirst bar when the bird crashes into the pillars, just in case i’ll show you when that would happen.

Here is the link to the gifs. so you can see what I’m talking about.
https://drive.google.com/drive/folders/10zMU8tjLhwwylDK6bnAPj0eXey3tIYCZ?usp=drive_link