Moving items in a simple inventory?

Hello everyone. I’ve never built a game before or coded and have been making an inventory system.
It’s simple. It just loads stuff from the inventory and places it into an empty slot.

But I have no idea how I would move the items around the inventory. Is there an easy way from what I already made, or should I remake the system differently?

What I want is you click on an item, it gets an outline and when you click on an empty slot it copies it and clears the previous one. Sounds simple, but I can’t seem to get it right.

If I am not mistaken, all I need is to copy contents of one InventorySlot to another by using the IDs. Somehow clearing the previous one and keeping the ID of the pasted one. I just don’t know how to do it/what action to use.

Any help/advice on the whole thing is greatly appreciated.

Current code and the failed remnants of the code for copying, as well the look of the inventory atm - placeholders.