Pro 5:1-2 My son, be attentive to my wisdom, incline your ear to my understanding; that you may keep discretion, and your lips may guard knowledge.
In order to stay on the right path, we must be attentive to wisdom. We must pay attention! It is so easy to end up on the wrong path, the path that leads to death.
Mat 7:13-14 Enter by the narrow gate; for the gate is wide and the way is easy, that leads to destruction, and those who enter by it are many. For the gate is narrow and the way is hard, that leads to life, and those who find it are few.
Ask God for wisdom and He will provide.
Jas 1:5 If any of you lacks wisdom, let him ask God, who gives to all men generously and without reproaching, and it will be given him.
But it isn't all sitting around and having God dump wisdom into your head. There will be work involved, both to attain wisdom and even to keep it. To keep it, follow God's laws. Stay on the right path.
Pro 3:21-22 My son, keep sound wisdom and discretion; let them not escape from your sight, and they will be life for your soul and adornment for your neck.