How does bee know which flower has nectar?
Bees simply visit many flowers and while doing that ultimately find out the flowers having nectar.