To get a bike, you must first stop Team Rocket in Fuchsia City’s Safari Zone as they are trying to capture a Dratini. The warden will be thankful for your efforts. Then, head to the Pokémon Center in the same city and talk to Nurse Joy. She wants you to give medicine to the other Pokémon Center, so she gives you a bike to traverse the bridge.