in her first life, her ability to heal is completely disappeared when she is 5 years old, but she met joshua & healed him once when she's 4 (hence the flashback that you read).
If you read carefully, you'll also find out that this is the reason why the Duke adopt her in her first life too. (She assumed the Duke adopted her in their first life bcs Joshua bragged about her ability to heal to the Duke in his dying days. Hence why the Duke still going through with adoption even after Joshua passed away & her ability already gone)

She said that her power was drained when she was adopted and then she was a flashback where she was healing joshua