God is the Source, Blessed be His Holy Name.
God gives knowledge & wisdom “freely”:
(meaning without checking whether you’re in His correct belief or not simply because “He is Good” even toward “His enemies” giving them “no” excuse that He didn’t care)
But, some are given “more” than others in “certain fields” :
“As for these four youths, God gave them knowledge and intelligence in every branch of literature and wisdom; Daniel even understood all kinds of visions and dreams.
Then at the end of the days which the king had specified for presenting them, the commander of the officials presented them before Nebuchadnezzar.” (Daniel 1:17 – 18)