Our hadiths indicate they know about the past, present, and future events until the Day of Judgment. They also have knowledge on the world of angels, the seven heavens, the throne of Allah, and much more. In sum, they have the greatest share of Allah’s knowledge and their knowledge is immensely vast.
Full answers in this documentary that I was part of
They know what Allah SWT teaches them, according to needs.