Smartphone cameras are getting better, but you may still want a dedicated camera. Some of the best cameras for beginners are from Canon, Panasonic, Sony and others.
The Bike Seat Rail Mount is the more straightforward setup but has a limited application. If you mount something like the Insta360 Ace Pro, it will record footage behind you like a rear dash cam.