/gamemode is simple, it is basically turning your gamemode creative, survival, or adventure.
/gamemode and most other commands can only be done on a cheat world. Without that, you cannot do /gamemode or /xp. On Minecraft bedrock, you can also shorten creative to c, survival to s, and adventure to a. But when you create the world, on Minecraft bedrock, you can scroll down to the bottom and turn on the cheats.
When you start creating the world, there will be a place for when you can turn on whatever gamemode you want. But if you turn on creative, you will activate cheats. When you have cheats you cannot earn achievements.