What is a good punishment for my son who stole candy?

My son of 6 years old stole candy out o the closet; what is a proper punishment to give him ? it was two days ago he did it, I’ve seen it just now; putting him in a corner won’t help cause he isn’t learning from it.