If the door latch on your home is sticking you should spray some WD-40 into the door latch on the side of the door.
Then work the doorknob back and forth and spray it again and it should free up unless something else is causing the door latch to stick.
You can also use some graphite or some wax on the door latch to stop it from sticking.
Sometimes the door latch or door strike might also need to be adjusted to fix a sticky door latch.
You can use some other type of oil as well which will work to lubricate the door latch that is sticking.