What's the best way to generate glb objects?

This is how I create a goblet (how to collect coins).

  BABYLON.SceneLoader.ImportMesh("", "/images/", "award.glb", scene, function (newMeshes, particleSystems, skeletons, animationGroups) {
    let award = newMeshes[1]

    //Scale the model down        
    award.scaling.scaleInPlace(0.05)
    award.position.y = 0.4
    award.position.x = randomInteger(-1, 1)
    award.position.z = 76

    award.animations.push(standartFrameRateAnim()) // Animation due to which the cup goes towards the character.
    let awardAnim = scene.beginAnimation(award, 0, 9, true)
})

What is the best way for me to generate a lot of coins without being signed?

You can create instances by calling mesh.createInstance to generate lots of identical meshes.

This is clear. But for me they should be generated until the user loses.
If he plays for a long time, then the page either lags or gets cut off altogether.

Are you sure you must keep all the coins ever generated? Can’t you set a fixed number at start (say 10000 or 100000) and reuse the first ones when you reach 10000/100000?

May be)))