this is a huge worry for me too. i trained a wait at every door starting with ones that are safe like back door to yard, bedroom etc. leash if u need to. body block to stop. if they hesitate stop click treat.
also independently teach a wait with a hand signal and voice cue. they tend to pick up better on voice where they don't with verbal if at all exited. do some loose leash walking in the house and click treat, take 3 steps click stop treat. be sure to click then stop and feed treat in heel position beside u. hold it there till pup goes back for it. soon he'll stop when u do, u can then start using the wait. i use a hand palm straight back arm straight down in front of pup's face. then step side 1 step if he stays click treat while in position, work up to step anywhere and walk around puppy. go a little further, come back c/t in position.
stay close enough so u can touch to correct. eh-eh..wait. the leash def helps here but don't use it to correct since u want this to be a leashless behavior eventually. for now it just prevents escape. keep it short, move through things fairly quickly, keep it fun, use good meat or cheese treats, and stop while pup still wants more. once u get this down on leash, at doors inside, do the back door. wait, go out, block any attempts to bolt, be leashed so bolting won’t succeed.
release the dog after rewarding in wait position. i use free. pick a word not often said so there will be no accidental releases. i used to use okay but i had too many releases by conversations.
get all this other stuff pretty solid before working with a danger door to outside. i would tether or leash. a tether may be safer at first...not to furniture...a dog can pull 3-4x its weight and my girl actually popped the huge couch up enough to slip the leash out from under it. use a banister, bolt in a stud etc. i use a bungee to soften any hard pulls.
ask for wait, go to door open close, c/t for a wait, correct eh-eh back to position wait. go to door open close. if dog pops up before u get there come back. reposition; try again. keep it short, work on getting longer open doors. it often helps to have a rug or threshold or some barrier they know not to cross. with me its rugs. this is a pretend wall u do not cross unless i say free any u are leashed. i stop and do a wait every time we exit that door.
up the ante by having some knock or ring the bell. take ur time since this is a set up, correct, back to position as needed to get to the door. add the doorbell when ready. just go slow, do it 2x a day or so for short sessions. repetition & consistency are key. best of luck!! if i have visitors and we're not solid i leash or crate until everyone is calm.