Yes, energy gels can be a good way to fuel before or during cycling. Energy gels offer a combination of quick-acting carbohydrate electrolytes and sometimes caffeine, which have been shown to enhance performance and/or recovery in endurance sports like cycling .
Energy gels are good to eat 30-60 minutes before a ride or during a ride that lasts longer than 60-90 minutes. Each package has about 20-30 grams of carbs and most cyclists will need 1-2 packets per hour to replenish carbohydrate during a long ride.
 Kerksick, C.M., Wilborn, C.D., Roberts, M.D. et al. ISSN exercise & sports nutrition review update: research & recommendations. J Int Soc Sports Nutr 15, 38 (2018). https://doi.org/10.1186/s12970-018-0242-y