Valheim has a number of mechanics which are not explained to you by design, how to effectively sail your ship/boat against oncoming wind is one of these, and in this guide, I’ll quickly explain what tacking is and how to do it.
Tacking is a maneuver used by sailboats to navigate against oncoming wind by turning its bow at a 45° angle relative to the direction of the wind, this is because of the no-sail zone which covers approximately 90° directly in front of the ship, where the wind will hamper or stall movement.
This is a mechanic of Valheim, your boat has a no-sail zone of 90° in front marked by a greyed out section of the wind direction ring, it has been highlighted in red here.
Turning your ship at the closest degree outside the no-sail zone will allow you to move in the desired direction at an acceptable speed, this is infinitely more preferable to navigating in a straight line against wind by using your rudder to slowly row the ship or waiting for a favorable wind.
Also, it’s more fun and engaging than either option.
By turning to 45 degrees towards either side when directly facing the wind and then repeatedly turning at an opposite 90-degree angle, we can zig-zag directly against the wind by using it to our advantage and easily reach our destination.
Your destination will not always coincide with the direction of oncoming wind, however, it will still flow against you, and tacking will be necessary for effective movement, you must identify and take the most favorable tacking angle of the two and compensate for deviation so you don’t overshoot or come too short of your destination.