Use the owner’s permission settings
Commands that change a world require the necessary authority. In current Java 26.3, the pause menu’s World Options provides Allow Commands and multiplayer Command Access. Earlier tutorials may describe a different Open to LAN flow. On Bedrock, the Allow Cheats setting controls access to many world-changing commands.
Choose the correct syntax
Run player examples from chat. The @s selector means the entity executing the command, which is not automatically a player in a server console. Use autocomplete and /help to check your installed build. Java 1.21.11+ also replaced old camelCase game-rule names with namespaced IDs, so old examples can fail.
Keep the original world available
Enabling cheats in Bedrock permanently removes achievement eligibility from that world, even after turning cheats off again. Make a backup first and experiment in a copy. Java advancement behaviour is a separate system; do not copy Bedrock achievement warnings across editions without checking the actual rule.