Motorsports is definitely not the cheapest, but it is even one of the most expensive. Most racing drivers started on karts, but even they are not the cheapest, prices range from 3K to 10K Euros.
Karts are often followed by Formula 4, which will cost you around 80K euros and that's just F4! Or the slightly cheaper (and slower) Renault Clio, which competes in the Renault clio Cup, which will cost you around 50k euros.
If you think this was expensive, then sit back now, because a junior Formula 3 costs around 500K Euros, the chassis alone costs 350K Euros.
In GT racing cars, the cheapest are GT4 specials, which cost around 200K Euros, a Porsche 911 cup car costs 250K Euros. The fastest GT-GT3 cars cost 500K-800K Euros.
A Formula 2 car, which is "only" one step up from Formula 1, costs 1 million Euros. Formula 1 itself costs around 14 million Euros. Of course, every F1 car is a little different and the prices depend on that, and only half of this amount belongs to the power unit, which is also different and therefore their price.
Hypercars that compete in the WEC series (some also in IMSA) cost around 2.5 million euros.
These prices are only indicative. There is no exact price list for these cars.