Is it necessary to create blueprint to create HUD?

No it not, at most you will need a hybrid solution. There 2 things you can use in C++:

-AHUD, the classical HUD canvas system for UE3 that is still in UE4, it was made to be operable in UnrealScriipt so it’s easy to operate it in C++

Because it has no explicit name it quite hard to find tutorials for it, you could try looking on UE3 material as it works in similar way. Also i dont think you need to worry about deprication of this as UE4 still heavy uses this to print debug data, all “stat” and “show” commends use this to print stuff on screen.

-2nd is Slate, Slate is a UI framework made for UE4 editor UI (UE3 used primery Windows UI APIs for editor), but it can be used in gameplay too… in fact it framework that powers UMG, it was made because Slate code is 95% incompatible with UE4 refllection system and effectivly blueprints, so wrapper was needed to be made which UMG is. Here docs:

UMG is also C++ programmable (all you see in blueprints is C++ programble as all this sits in engine source code you can call up from C++), but Slate a lot more comfitible to use in C++, the huge plus is fact it uses some C++ hacks to make describing UI in code a hell lot easier:

ChildSlot
.VAlign(VAlign_Fill)
.HAlign(HAlign_Fill)
[
	SNew(SOverlay)
	+SOverlay::Slot()
	.VAlign(VAlign_Top)
	.HAlign(HAlign_Center)
	[
		SNew(STextBlock)
		.ShadowColorAndOpacity(FLinearColor::Black)
		.ColorAndOpacity(FLinearColor::Red)
		.ShadowOffset(FIntPoint(-1, 1))
                    .Font(FSlateFontInfo("Veranda", 16))
		.Text(LOCTEXT("HelloSlate", "Hello, Slate!"))
	]
];

Not to mention UMG don’t have all slate widgets binded to it, so sale has a lot bigger pallet of widget, you can explore them here:

Only thing you need to watch out is to not use editor widget sitting in editor modules, those won’t build in packaged game. Minus is as all editor related stuff, it is weakly documented, but once you catch the pace you should able to figure things out by yourself