How to give gifts to NPCs
You can give gifts to named NPCs by starting a conversation with them. In the middle of dialogue, you should see the “Gift” action/prompt. Press this button to open your inventory panel, which allows you to select a particular item that can be given to the character.
Characters can include everyone from those that play major or supporting roles in the story, right down to your average vendor, innkeeper, or oxcart driver.
Note that affinity can only increase once per day. That means you have to rest periodically while handing out gifts to people.