How can I let the tool appear in my inventory if touched

hi everyone, I’m currently working on an Inventory System, and my problem is when I touch a tool the tool gets to my hotBar and not to my inventory, pls tell me step for step how to let it appear in my inventory:Here are some photos:


I always have to drag the item from the hotBar to the inv