How to reduce voltage of a dynamo to 5 volts
Starting with a higher voltage in this case is better because it allows you to regulate down to the desired voltage.  On a bike, the actual voltage will vary considerably.  A simple circuit would be use a buck regulator, which can only regulate down.  Since a buck is efficient, there is little harm in the input voltage being higher, within limits.  However, a "12 V" unit isn't going to put out such high voltages that it becomes a problem.

Measure the open circuit voltage of this unit with the bike going as fast as it ever will, then leave a little margin and design to that as the maximum input voltage.

Many bike generators actually produce AC, so you need a circuit that rectfies the output and bucks it down to 5 V or whatever you want to use.  It would probably be a good idea to include some logic to positively shut down the 5 V when there isn't enough input voltage to support it rather than letting it sag.  If you know whatever is connected to this "5 V" line isn't going to mind being at lower voltages for extended periods of time, then you can skip this part.