It can often coincide with them having colds and if they’re a little snotty it can get in their eye. There are some drops that are suitable for them, like Liv said.
I was told by the doctor that drops cure it half a day earlier so it's not really worth it. I use cotton pads with boiled water and breastmilk and it goes in a day or two
My son used to get it as a newborn. Just keeping the eyes clean with warm clean water on cotton pads is the trick. Maybe some eye drops if their eyes seem dry? Certain drops are suitable for babies I believe. Though I didn't do this.