InstancedStaticMesh C++

I am trying to create and spawn multiple instanced meshes for a procedural level. The examples I’ve found are outdated and don’t work. My attempts only cause the engine to crash.

Could someone show how to simply create InstancedMeshes in C++ (In a for-loop for example)? Thank you so much!