God has prepared us for good works before the foundations of world were made. We are not saved by doing these good works, but we are saved by the good work that was done through Jesus's death on the cross.