Your question is a bit sparse on details but this should give you an idea anyways:
extends VBoxContainer
var items = [
{ "texture": "res://apple.png", "name": "Apple"},
{ "texture": "res://banana.png", "name": "Banana"}
]
func open_Inventory():
for item in items:
var item_row = HBoxContainer.new()
var item_image = TexureRect.new()
item_image.texture = load(item.texture)
item_row.add_child(item_image)
var item_name = Label.new()
item_name.text = str(item.text)
item_row.add_child(item_name)
add_child(item_row)
show()
func close_inventory():
for item in get_children():
item.queue_free()
hide()