How would I go about doing a [player click to view]

I have something on the back of my mind that I cant seem to stop thinking about, I would love to be able to make a GUI popup when you get close to another player for example you walk up to Player A and the GUI pops up with profile stats and you then can click the player and it would pull up a “Profile” of the player which would be another GUI. How would I go about doing something like this if this makes any sense lol.

Thank you very much, I am very interested in this topic.