Meaning of phrasal verb hit upon in English

hit on/upon something

[no passive] to think of a good idea suddenly or by chance

She hit on the perfect title for her new novel.