Although it’s fine debating what book gandalf was said to achieve most people here i think tend to be referring to the movie version when they discuss what he was shown to be capable of so saying X Y and Z happened in the books doesn’t especially help much.
I wonder, if you went through the LotR movies, what each and every instance of gandalf using magic would be in terms of the closest DnD spell,
Intimidating bilbo at the start of fellowship? Well that’s thaumaturgy, with maybe a minor illusion on top
Sending the moth to call the eagles to rescue him from saruman’s tower? Easily Animal messenger
Defending/destroying the bridge in moria? Thunderwave perhaps? Shatter?
Calling shadowfax? Summon steed