There are a few many ways of doing it. Here' one (hardcoded text content however)
·Create a Sprite2D that will act as the box holding your text.
·Create a RichTextLabel as a child node.
·Size and place things up according to your needs
Via script you store your possible text values inside an array, like:
var texts = ["text 1", "text2" etc]
·Assign a script to your parent sprite where you can access your rich_text, something like
onready var speech_content = self.find_node("RichTextComponent")
now you can change it's value via a simple assign operation:
speech_content.set_bbcode(texts[1])
(place it inside a function and code it according to the rules you see necessary)
Of course this is a very simplified example. You'll still need to track the mouse clicks and call your function, deal with the opacity of the Sprite so it may vanish when not used, stuff like that.
If you need to deal with texts originated from other game objects you will have to deal with signals.
If you got lost try to watch a few tutorials about arrays and simple programming definitions.
Hopefully this will be enough to get you going!