This has been discussed quite a bit around on the forum:
Animate multiple Ready Player Me avatars in the same scene - Questions - Babylon.js (babylonjs.com)
Loading character with animations to scene and cloning it with animation groups - Questions - Babylon.js (babylonjs.com)
Copy animationGroup with skeleton - Questions - Babylon.js (babylonjs.com)
Attaching GLTF/GLB animations-only files to GLTF/GLB 3D models - Questions - Babylon.js (babylonjs.com)
Hopefully these help you, and if you have any further questions feel free to update this topic