Create cubes runtime while scripting

Hi all!
I’m totally new in Unreal Engine. And all things I found on internet were problematic.
What I want to acheive is to create a sphere in script and when I launch my scene, this object is loaded at the good place.
In fact, I want to generate a little point cloud using a file. I read the file, and for each point XYZ, I create a little cube at this place.
For it, i thought about Using a Vector (or whatever is the class for vector in Unreal Engine) and save all my datas then create at runTime the cubes from this vector.

I found things like
AMyPointCloud::AMyPointCloud(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
EventPublisher = ObjectInitializer.CreateDefaultSubobject(this, TEXT(“EventObj”));
PrimaryActorTick.bCanEverTick = true;
but I saw too ObjectInitializer tend to be deprecated. and UEventPublisher is not declared.

Sorry if it’s a repost, I can’t find the good words to make the good researches I believe since I’m new with Unreal Engine vocabulary.

If someone can indicate me which function to use I could search in the documentation.

Thanks for all!