If you want a modern language that is purpose-built for creating games like this, there are a ton of visual novel engines. Those engines are optimized for trees/paths of dialogue and text, and for displaying media (images + audio) with the text.
renpy [0] is probably the most popular of those, but there's a long history of them if you do some digging with those keywords.