I check that sha256 hash matches then I compile it and I overwrite whatever was on the bitcoin folder previously. Is this ok, or should I first delete the bitcoin folder, and the compile it or any other steps I may be missing?
I don't know definition of "correct" in this case, but here are few common recommendation.
1. For security purpose, you may want to verify the signature (which contain hash of the files).
2. Do not overwrite/delete the Bitcoin directory (which contain executable file), but rename/archive it in case compilation failed or newer version has unwanted bug/behavior.