Piety is used to declare holy wars, create holy orders as well as give to your head of faith in exchange for gold (if your religion has one). Being virtuous and religious will earn you more piety and this is useful any time you’re interacting with your head of faith, or even reforming/creating your own religion. For example, if you need a divorce but you have a very low opinion with your head of faith, he won’t give you a divorce. ?
Go on pilgrimages and try to groom your children into virtuous people with good personality traits that will give them more piety.
Increase your level of devotion by earning more piety and avoiding sinful acts.
This will then further improve all religious relations and allow you to benefit a lot more from your church holdings as well as enable you to have access to holy wars in the first place.
The main ways of earning more piety is by going on pilgrimages and by focusing on the learning lifestyle. Go into theology focus which gives +1 piety per month and also collect all relevant perks.
Raising your learning skill will earn you more piety so get a spouse with high learning and put him/her on the patronage task on the council.
Your bishop’s first task also generates piety so having a high learning skill bishop is a very good thing as well.