Tracks are procedurally created (in theory there can be infinite tracks). They are made of pieces (40 different ones) that are joined at random before starting the race.
This website explains the basic theory http://kidscancode.org/blog/2018/09/godot3_procgen3/ ( I did something similar )