How to assign a C++ variable to be a pointer to a widget blueprint?

Any recommendations are fine.

And thanks in advance.

I’m going to assume you don’t literally mean the widget blueprint asset, but a widget (UWidget / UserWidget) in a widget tree?

If so, just add a pointer marked with BindWidget:

UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
    UWidget* SomeWidgetInUserWidgetTree = nullptr;