Bonjour Julia,
You have to think of ueill as a combination: oo (as in "cook") followed by a y sound. So cueillir is pronounced [koo yir].
This is a variation of the letter combination euill pronounced the same way, as in feuille. The e and u change places because of the c.
You might find this helpful:
https://www.lawlessfrench.com/pronunciation/ueil/