This is almost certainly I Reincarnated as the Hero's Childhood Friend Who Was the Losing Love Interest, so I Changed Jobs to Alchemist, a Japanese black and white manga.
Laura, the childhood friend, has been completely forgotten! In the world of a game, Laura has been reincarnated as "the losing heroine who is forgotten, despite confessing." Instead, she'll aim to be an alchemist to escape that fate...
However, when Laura meets Arnold, a person who should not be there, she realizes there are many differences between this world and that of her memories. This difference could even affect the future of her childhood friend, the hero!
She will never be chained down by fate! A different world reincarnation story of a girl who never gives up!
The synopsis covers several of the main points. The main character reincarnated in another world as a child. She's the second female lead of an RPG - the one that stays behind in the Hero's village while he's off adventuring, and falls in love with one of his companions. The cover shows the female main character with brown hair; the hero (OG male lead) has blonde hair, the new male lead has black hair.
She recalls a "witch" living in a forest and goes to be her apprentice...
And, after several years, passes the exam. Which includes her wearing a lab coat, which makes her look like a stereotypical scientist.