When you open the oven door within the first 20 minutes of baking you’re messing with the pressure the rising steam on the cake has created. This will lead to a sunken cake.
As the cake bakes, you use a knife or large object to poke it to check if it’s done. This is basically like building a deck of cards and deciding you’d like to see what the bottom card looks like so you pull it out. You’re making a rather convenient chimney or vent for all the rising gasses in the cake to escape. Don’t do it. Rather use a toothpick or get a proper cake needle.