For those of you looking for something like this.
Creating static mesh at runtime isn’t really a well supported feature. It does kind of exist, but the way it has to be done is very heavy. The way that function linked by the OP works is by using the asset import pipeline which is editor only so that will not work in a released game. The static mesh does have a different way to support it, but it’s pretty ugly for what it sounds like you want.
What I can suggest if you’re only concerned about the rendering performance of the ProceduralMesh is to use the RuntimeMeshComponent instead. It renders at almost identical speed to the static mesh while allowing runtime updates, and far more features than the PMC.