In the Lord of the Rings trilogy, Gandalf the Gray is the only one of the maiar who actually takes his Istari mission seriously. He roams around Middle Earth, gathering knowledge and guiding and protecting its peoples. In some ways, this makes him a little unpopular among the kingdoms of men, because he often shows up bringing tidings of war or great hardship ahead, and so they only see him when bad things are about to happen. Nevertheless, he brings this news for good reason, and always helps the kingdoms to prepare, which means that he has earned their trust over time.
This can be seen most clearly with the two great kingdoms of Middle Earth at the time of the War of the Ring: Gondor and Rohan. Gandalf comes to Gondor at a time when he is desperately needed. Denethor has given into the fear-mongering of the Palantir, and is weakened by the loss of his oldest son Boromir. Gandalf also comes to Rohan in its time of greatest need, when Saruman has poisoned the mind of King Theoden using his dark and secret trickery.
LOTR: Why Does Gandalf Silence The Hobbits In Front Of The Mouth Of Sauron?
However, despite Gandalf being a powerful wizard, and also being willing to sacrifice everything to help those he loves, neither of the rulers of the two great kingdoms seem particularly willing to accept his help and advice. For Denethor, this makes sense. He has been being fed lies and paranoia by Sauron in the Palantir, so he is mistrustful of absolutely everyone in his life, including his remaining son Faramir. But for Theoden, this is much more confusing, especially given his long history of friendship with Gandalf.
Even once he has been cured of Saruman's toxicity, and of Wormtongue's lecherous influence, Theoden still seems adamant
Read more on gamerant.com