In typical inventory way, you get the variables you need from the 3D object on the ground, and create a UI element that has all these variables, then when the UI element is created, you delete the 3D object. The process is the same the other way around.
You can do that with a custom_class.
CustomClass that holds the variables
extends Node
class_name ItemVariables
var item_name : string
var item_icon : Texture2D
var item_mesh : MeshInstance3D (or a PackedScene)
etc
3D Object
var itemvariables : ItemVariables #the variable that holds your ItemVariables
func create_3D_object(_itemvariables : ItemVariables, ui_element_reference):
itemvariables = _itemvariables
#assign whatever you need to assign here, for the mesh,
ui_element_reference.queue_free()
UI Element / inventory slot
In the create ui_element, you can retrive those variables and create whatever you need (visual stuff)
var itemvariables : itemVariables #the variable that holds your ItemVariables
func create_ui_element(_itemvariables : ItemVariables, 3D_object_reference):
itemvariables = _itemvariables
#assign whatever you need to assign here, for xeample texture, amount, etc.
3D_object_reference.queue_free()