From this page of the Valheim game guide, you will learn how to allocate a stack of items or raw materials to manage your inventory effectively.
The game of Valheim allows Players to split up stacks of items or resources that accumulate in one place in the inventory until one stack (stack) is full. Thanks to this treatment the player saves a lot of space in the inventory, but sometimes it can be impractical if, for example, for a short exploration of the map you want to take only 5 pieces of boiled meat, and not as many as 20 (full stack) or keep a certain amount of raw material with you.
In Valheim, you can easily separate items by holding down Shift and LPM-clicking the mouse on the desired stack of items. An additional window (Split stack) will appear on the screen, where you can use the slider to choose how the items will be divided. It's a good idea to make sure you have at least one free space in your inventory before dividing items.