you can always lock the door, like whiterun (before talking with alvor). but if you dont want the player to cheat, you can use a static object that looks like a door (or an activator/talking activator object if you need it to tell the player something), then do the enable/disable switcheroo for the real door once the quest is done. if you do use an activator of some sort, you dont actually need to switch it out, you can have the activator control a hidden door that puched into geometry somewhere nearby (i use an "invisible door" that has a marker for its 3d so its not visible in game at all)
my amethyst hollows mod has this exact scenario where you need to finish the quest before you are allowed to go inside, and i have it set up so that the activator controls the door, or otherwise does some other action. you can put the getquestcompleted() inside the condition in the activators script, or quest script, however you decide to do it (i think this is how the black door works for the DB quest)
speaking of black door, you could make your door a talking activator and have a guys voice say something to you to make it sound like he's talking from the other side of the door