so your item Id for potion is 1... continue...
I want suggest you to use an invisible tilemap and check if the object is at a specific tile position, if so, improve the player with its stats.
To know the tileposition, you can check the positiontotileX and Y of the tilemap
The only problem i'm having is to store an item only in the first empty slot instead of all the empty inventory slots, what i wanted to do is if the player clicks on an equipped item the code would remove this piece from the equipment slots and store it in only the FIRST empty slot available of the inventory, the way that i tried to do is checking the array XY but it doesn't change the value (to store the item) of only the first empty slot but ALL the slots, i don't know how to fix it i'm using the array in a wrong way.