How to replace the vertices of skeletal mesh

Hi, I’m new to unreal engine, and I haven’t really got used to it yet. I need a c++ code to replace the vertices of the skeletal mesh. That is, I have a created skeletal mesh object on the stage and I want to replace the vertices with others in real time (for example, using the actor component), but I can’t do it in any way. It seems to me that the vertices are stored here:
auto& renderData = mesh->GetResourceForRendering()->LODRenderData[0];
auto& staticBuffer = renderData.StaticVertexBuffers;
auto& vertices = staticBuffer.PositionVertexBuffer;
(mesh is USkeletalMesh)
When I change PositionVertexBuffer, nothing happens on the screen. It’s possible that I’m doing something wrong. Please tell me how to do this.