If you keep dying early on, food is very often the reason. In Valheim your health and stamina come almost entirely from what you eat, not from levelling up. So getting your food sorted is one of the biggest early upgrades there is. Here is what to eat when you are just starting out.
Why food matters so much
You have three food slots, and you want all three full at all times. Each food you eat adds to your max health and stamina for a while, so eating three different good foods instead of one weak one is a massive difference. More health means you survive hits, more stamina means you can actually fight and run.
The best early foods to go for
Grilled neck tail, from the little neck lizards by the water. Easy to get and easy to cook.
Cooked deer meat and any other cooked meat, straight off the cooking station.
Honey, which you get from a beehive. Simple health and easy to keep a stack of.
Raspberries and
Blueberries, found in the Meadows and Black Forest. Great cheap stamina.
Mushroom, on the ground in the Meadows and Black Forest, and
Yellow mushroom, which only grows inside burial chambers and troll caves, so grab them while you are in there for cores.

A simple starter combo
If you just want something that works, run Grilled neck tail,
Honey and a handful of
Raspberries. That gives you a nice mix of health and stamina and every bit of it is easy to get in the first hour or two. As you push further you will unlock better stuff like jerky and stews, but this will carry you a long way.
Keep those three slots full and you will notice the difference straight away, both in fights and just getting around. Once you are eating well, you are ready to take on Eikthyr, the first boss. Happy adventuring!