As an example, is how I instantiate my UMG HUD widget in C++. Once it is created, I just use that instance pointer to add/remove the widget as needed:
HUDWidgetInstance->AddToViewport();