Lutherans struggle to steer clear of both ditches. So good works are necessary, but not for salvation. Salvation is necessary for good works. Works are the good fruit hanging on the living tree of faith. They are what happens when we trust Christ for our salvation.
Works serve our neighbor and supply the proof that faith is living.
The best guide to good works is the 10 Commandments. That's why the Small Catechism urges us to pray them every day as you go about our work. They are the marching orders of Christ's royal priesthood in which you are a priest anointed in Baptism. What surprises most people about the commandments is how plain and practical they are. No fasts or pilgrimmages.