I’m not a expert on the matter if you search around the net you will find tutorials on more than one method but i will tell you the easiest to me at least. as you know each vertex in the 3d world is pointing somewhere when u get that direction from the vertex to the origin point u will know where its facing usually called a normal but the normal is a representation of that ray in the size of one extending from the point towards infinity. (I hope someone corrects me if im wrong since i didnt study any of this).
Multiplying the vertex by its normal will give u the result you want since the origin point will cast the rays in all directions it will for a sphere also consider that the normal is size of 1 so you need to Multiply by your desired scale to scale the sphere
sphere = normal * vertex * scale
you have to do it to all vertices in your cube.
here is an image that i created to explain what im saying i hope it helps and if there is anything wrong with what i said i hope that someone will correct it :). good luck.