Create small “info blueprint”, all it should have is some invisible root component (can be capsule, trigger box, arrow, anything that you can hide in game and can use world location).
Then on top of that “invisibl root” add "umg widget component (its experimental but works quite well). Set that widget to your info umg blueprint, set it also to screenspace.
When you click on object show that widget and set its world location to in game object location.
Now there is some small quirk about all this.
If you are making singleplayer, then you can either add that widget to all buildings in game and display it. Or make it as blueprint that is tracing player mouse etc.
But if you are making this game as multiplayer that widget must be visible to owning player only. Which means you should add it to same pawn as camera.
Okay I have been playing around with the method you described and got this:
The problem is I still don’t know how to constrain the UMG widget inside the screen like in SimCity and perhaps even make the widget spawn “next” to the building like in the simcity video i made.
To constrain it you would need to modify the implementation of the widget component shared world space panel in C++. The default implementation only knows how to project into screen space, doesn’t know how to do anything fancier. Either that - or do something completely custom, moving a widget on the screen based on completely custom logic, and not trying to use the widget component at all.