Solomon famously asked for wisdom as he was given kingly authority to rule Israel (1 Kings 4). God gave it to him.
Does that mean Solomon had not been taught wisdom before?
No! A child should be taught wisdom, and a young man should remember what his parents taught him, but he needs to acquire apropriate wisdom as an adult with new responsibilities. Thus, Solomon writes,
My son, if you receive my words
and treasure up my commandments with you,
making your ear attentive to wisdom
and inclining your heart to understanding;
yes, if you call out for insight
and raise your voice for understanding,
if you seek it like silver
and search for it as for hidden treasures,
then you will understand the fear of the LORD
and find the knowledge of God.
For the LORD gives wisdom;
from his mouth come knowledge and understanding (Proverbs 2:1–6; ESV).
Even Solomon’s ideal reader, a young man who was faithfully raised by godly parents, needs to pray (“call out”) for wisdom and search for it as diligently as one would pursue a fortune. Ultimately wisdom does not come from anyone but God.
Since Solomon often personifies Wisdom as a woman, compare Proverbs 19:14- “House and wealth are inherited from fathers, but a prudent wife is from the LORD.”
Also notice that the epistle of James contains the same mandate for acquiring Wisdom:
Count it all joy, my brothers, when you meet trials of various kinds, for you know that the testing of your faith produces steadfastness. And let steadfastness have its full effect, that you may be perfect and complete, lacking in nothing. If any of you lacks wisdom, let him ask God, who gives generously to all without reproach, and it will be given him. (James 1:2–5).
So one builds on the truth one has been taught, applies it to his experience, and asks God for wisdom through that process.