IIRC in Blueprint you have to first ‘create’ or spawn the widget inside the player HUD, and then call ‘Add To Viewport’ on that created widget, you’ll probably want to find the same functions in code.
Think of ‘Create Widget’ as though it’s spawning something, then you add that spawned ‘thing’ to the viewport. I’m not sure if this HAS to be done inside a sub-class of ‘AHUD’, but it might.