If you want it to just auto-collect the items if the player is near them instead of having to click, simply add a boolean in InteractableObject autoCollect. Then in the OnInteractableHit add a check for whether the autoCollect is checked, if so, run the pickup function. It will look something like this:
if(other.tag == “Item”)
{
//Set the interactable to the currently selected interactable
selectedInteractable = other.GetComponent();
if(selectedInteractable.autoCollect)selectedInteractable.Pickup();
return;
}