So basically you just call the AddToViewport function after creating your widget with the CreateWidget function. Here’s some code I’m using myself.
if (UMGScoreboardClass)
{
scoreboard = CreateWidget<UScoreboardWidgetBase>(this, UMGScoreboardClass);
scoreboard->AddToViewport();
}