"What is the source of such moral and spiritual power, and how do we obtain it?
The source is God.
Our access to that power is through our covenants with Him. A covenant is an agreement between God and man, an accord whose terms are set by God. In these divine agreements, God binds Himself to sustain, sanctify, and exalt us in return for our commitment to serve Him and keep His commandments."
D. Todd Christofferson, Apostle of Jesus Christ
Baptism is a covenant and a commandment.