How to make Dialogue System

Hello everyone! I have a question and I would like to get ideas or ways to achieve my results.

What I need to do is a customizable dialogue system to be placed on humanoids and objects. I need to make it something similar to this, any idea how to start or how to develop it? I’m not really sure how to begin, and it would be great to have ideas and guides to know how to make this possible.

Reference image for dialogue system:

This image represents the outcome I need to achieve. When the player approaches, the icon changes, and when hovering over it with the mouse, the mouse pointer changes to a click icon. Clicking it will display the dialogue (in some cases, there may not be any dialogue, so it should be customizable).

Dialogue Example:
image

Module script that i have worked on:

local NPCInteractionModule = {}

function NPCInteractionModule.ShowDialogueBubble(npc)
	-- In this part I will implement the code to show a dialog bubble over the head of the NPCS or Object
end

function NPCInteractionModule.HandlePlayerResponse(response)
	-- In this part I plan to implement the code to manage the responses
end

return NPCInteractionModule

Current dialogue that I’m working on:
image

image

I need to create a dialog similar to the one in the reference image, any idea how to achieve it?