To open the Valheim console, tap F5 on your keyboard. To enable cheats in Valheim, type "devcommands" (without quotes) into the console and hit Enter. You'll see a message come up saying "Cheats: True". After that, you can use any of the below console commands as you like.