How to give object to a npc from my inventory?

Pretty self explanatory. I have a drag n drop inventory and I want to be able to give other npc’s objects. The idea is to also use this mechanic with objects too so combining an object from inventory with a npc or object in the world is part of a quest.

I want the player to not know which object may be needed, so the “you have a key you open the door” mechanic doesn’t apply here. I want the player to find the correct key among many, by combining storyline hints and clues, and then open it by dragging and dropping to the door. Any ideas?