Dogs are incredibly smart, and once we show them how to do something (and we practice and reward and practice and reward and…), they will be able to reliably perform that command. In that situation that you practiced in.
You see, dogs aren’t great at generalizing information. This means that what they learn in one place (ie the kitchen) doesn’t transfer over well if you ask them to perform that same command in another place (the yard). If I practice all of my commands in the kitchen, and my dog can sit, down, roll over, shake, and spin without hesitation every time, that’s awesome. But unless we also practice those skills in the living room, on cement, at the busy park, in the middle of a hardware store, on wet grass, your dog will likely struggle when you actually need them to perform the command. You just have a good kitchen dog.
We need to take the time to really help our dogs generalize this new information by practicing. And practice a lot. The time that it takes your dog to perform the command in a new situation will be so much shorter than when you first taught it. She already knows the command, we’re just reminding her that she can now do it in new places. And the second time will be even faster. Until eventually, your dog will say “Alright lady! We’ve practiced this hundreds of times in so many places, I know exactly what you want, and I can do it anywhere!” That’s when you no longer have a good kitchen dog, and you have a dog that you can conquer the world with.