Hey I have had this issue for a while, well not exactly. I have been able to add a UI widget to the game but no matter what I do, another error comes up. First option I did was add the widget to the viewport with some blue printing. But game kept crashing about 15 secs after it was used. I basically added it to an object that would add the widget to viewport based on a mouse click. Second option was adding it to a UI already used in the game, such as the player hud and then I tried the inventory UI. But every time I did, it made the HUDs act weird, such as not functioning the way it was meant to, and things went missing. Now the reason I am telling you this is because the functionality of the hud in the game is done in C++ hidden from us, so I think you are going to run into more problems once you add it and won’t really get that much help solving it, not that you shouldn’t try but just giving you a heads up :). However if you do get it to work, please let me know lol.
Anyway you can add by blue scripting in the player pawn event graph with a key event, however there is an option in the default panel of the player pawn that allows input from the user that you must check first called auto receive input. Then with the key event you just create the widget and add it to the viewport. Good luck