When we mess up it doesn’t take away our salvation. Making a mistake does not lessen who we are at that moment. We will fall short. It is our path (lessons) that makes better efforts.
Learning takes place as we lean more on God. That brings us closer to Him. We lead a selfish lives for years.
It takes practice, patience, and a humility to fall short and learn in getting it right! It wont happen overnight, but it will happen when your heart is consistently in the right place.