Delayed obedience is disobedience. Knowing to do good and refusing to do it, is sin. Far too many opportunities to serve the Lord, to touch someone's life for the sake of Christ, or for just help someone in need, are lost because of a Christian's refusal to "do good" when they knew it was the right thing to do. Some "right things" can be costly. Standing up to a bully might be hard, but wouldn't you want help from someone else if you were faced with the same threat? Speaking up when critics are telling others that the Bible is in error or that Jesus Christ isn't God can be difficult and can bring mocking and ridicule, but didn't Jesus stand up and speak up for you when He died on the cross?
God doesn't always let you know ahead of time when an opportunity will come for you to do the right thing. But you can always trust Him to fulfill Philippians 4:13 in your life: He will give you the strength to obey Him. Doing good will always be the right thing to do.