Two people can live lives that look exactly alike but one of them will be saved and the other one not.
Why? The difference is the motivation behind what we do. Are we trying to buy our way to heaven like a sales transaction, or are we simply loving and trusting our creator by obeying him?
It comes down to this. It is not what we do, but instead why we do it. Are we on his team or our own. Are we doing the good works for God or for ourselves?