This will not spawn anything in the game, but the code that danielvmacedo provided will make it so that the ASpawnFactory class will have a root component, and this root component is the SphereMesh that you’re creating. If you wish to spawn something in the scene, you would want to use SpawnActor in the BeginPlay function.
I would suggest following this tutorial to learn some more about spawning actors/meshes, specifically the spawning projectiles section.