How to add widget in Unreal Engine?

You always get class of a asset not the class it generates, so oyu actully getting UWidgetBlueprint

You need to get generated class from it:

But in general you should avoid hard coding assets bindings, best practice is to use UPROPERTY with UClass* or TSubclassOf that you can set in blueprint to point to specific widget in blueprint defaults, in this case you want user (of editor) to pick UUserWidget class