You're not doing anything wrong. Your iPad is operating just as expected.
When an active App is displayed full-screen, the dock will automatically hide. By contrast, when Apps are being used with the iPad's Windowed Apps or Stage Manger display modes, the Dock will remain visible at the bottom of the screen unless an App window overlaps the Dock - at which point the Dock will be hidden. This is how iPadOS is designed to operate.
The Dock, when hidden, can always be exposed by simply swiping up from the bottom edge of the screen - just enough to expose the Dock.
If instead of lifting your finger from the screen when the Dock has been exposed you continue the swipe to the centre of the screen - and then lift you finger - you will trigger the iPad's App-switcher screen (also known as the Exposé) view. Here you will see a small window for each of your currently open Apps; you can switch to another open App with a simple tap of the associated window.
The iPad User Guide is a rich and often overlooked source of information about iPad and iPadOS. Here is a link to the section of the guide that outlines the basic control gestures used to navigate iPad, the Control Centre and Apps:
Learn gestures to navigate iPad - Apple Support