On this page of the Valheim guide, you will learn how to recover items that you lost after dying.
Death is an indispensable part of the gameplay. You can die in a variety of ways - you can get smothered, drown, or get crushed by a falling log. When you die, you will reborn at a respawn point (your bed or the starting circle).
Unfortunately, when you die, you respawn without any equipment. To retrieve it, you must go to the place where you died (the skull on the map) and find the tombstone. This is where all your equipment is. This way of retrieving gear also applies to the ocean. In this case, the tomb will simply float.
NOTE, BUG: There may be a bug where you don't leave a tombstone after dying. In this case, you will not be able to recover your equipment. Therefore, you should avoid carrying all your gear with you.
You also need to keep in mind that if you were killed by an enemy, recovering your equipment can be problematic. In that case, it's best to sneak as close to the tombstone as possible, quickly grab your belongings and run away. Once you have moved away to a safe distance, equip the recovered items.