Just to make sure for your next photoperiod: During veg, you need to keep lights at 18 on, 6 off. This will keep them in vegetative stage for as long as you want since it's the increase to 12 hours of DARKNESS that tells the plant to start flowering stage. That's why it's so important to have a lightproof tent or other space since if they get light during their 12 hours of darkness, they can re-veg, herm, or do other undesirable things. Vegetative stage usually lasts between 4-6 weeks. This length of time allows the plant to grow big and strong and vigorously and helps it create many bud sites. You can keep them in the vegetative stage as long as you want, but personally, I flip to flower (12 on, 12 off) once they're about a third to half of their total expected height (taking into account any plant stands, how high I can place my lights from the plants, what intensity level they're on, etc.
Cannabis can physically begin to make flowers after it's about 3 weeks old from sprouting. Granted this isn't ideal as they won't be big or plentiful, but they're physiologically 'mature' enough to produce flowers which is why you're seeing that development at 5 weeks. So, if it is showing flowers, it's definitely not in the vegetative stage any longer which also means you should adjust temperatures, humidities, nutrients, etc. to appropriate levels.
My recommendation is to not re-veg them since that can be a lot of stress for the plants and will take a lot of time.
My other recommendation: check the height/intensity of your lights - the last 3 photos of your original post look like they're experiencing some light burn...yellowed tips, lighter green, especially at the top of the plant. Could be nute burn, but it looks isolated to the top of the plant (at least from those pics) so that's what makes it seem like light stress.
Good on you for continuing to learn new things and not being afraid to ask!