Allah has infinite knowledge , since if he was finite he wouldn't be God,
Allah keeps on creating, by saying Allah doesn't change, what's meaant is his attributes , his knowledge, Allah is beyond time , so we shouldn't try to think theses things too much .
God cannot be finite , ofcourse, Maybe in some other sense , but try to understand. He has infinite Power
https://islamqa.info/en/answers/9571/what-is-the-meaning-of-the-hadeeth-do-not-inveigh-against-time-waqt-for-allaah-is-time-waqt
Say, "If the sea were ink for [writing] the words1 of my Lord, the sea would be exhausted before the words of my Lord were exhausted, even if We brought the like of it in [continual] supplement."
18:109
Footnote
The words of Allāh's unlimited knowledge or words describing His attributes and His grandeur or praise of Him (subḥānahu wa taʿālā).