This is great for a first game!
This type of game turns up on Newgrounds quite often but your version is amongst my favourite ones. The movement feels just right, the difficulty is neither boring nor impossible, I love the score counter which makes you feel the sense of 'rush', and unlike so many other people you don't restart the level immediately on contact with an obstacle, which is very important to understand what exactly happened and to give you a little time to prepare for your next try.
I managed to jump over the obstacles by going over the edge and quickly back again which makes you spin and propels you in the air. No need to fix this 'bug' though, as it is a pretty risky move requiring a lot of luck to pull off successfully.
It's a simple game, but if you decided to expand it (or as tips for your future games):
– SOUNDS. They make a part of the atmosphere and enjoyability of a game. Many games wouldn't be as fun if they had no sounds.
– The edges of objects are jagged which is most visible on the flickering shadow of the red cube. Perhaps try antialiasing if it helps (in Graphics settings in Unity).
– The score should be passed between levels. The score resets when you crash which is fine, but because it's not passed between levels, a player with no crashes ends the game with the same exact score as the player who crashed all the time.
https://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html
– Quit button is pointless in a WebGL game. "Play Again" would be much better.
If you decided to add more levels, keep in mind the "road" doesn't need to be a straight line – it can be curved, go up or down, get wider/narrower, split, have gaps in it. There could be a harder path with double score and an easier one. Just some ideas.
Anyway – well done and good luck with your future games.