Clicked the mouse - added a sprite

My task is very simple, but I have not found a solution for a couple of days. I need a sprite to appear at this point when I click the mouse button. Tracking a mouse event is not a problem; set a position too. Does anyone have a code to add a sprite to the scene? I already reread everything.
If you can, show the code.

https://docs.cocos2d-x.org/creator/manual/en/scripting/create-destroy.html
You just have to create the node, add the sprite component and set the sprite frame to the component and set the parent of that node to appear on the scene.

I can do this, how to set the frame?

Just follow the doc that I’ve linked:
yourSpriteComponent.spriteFrame = yourSpriteFrame

You can declare the spriteFrame as a property as the doc does to assign it from the editor inspector.

Property

const {ccclass, property} = cc._decorator;

@ccclass
export default class Platform extends cc.Component {

    @property(cc.SpriteFrame)
    spriteFrame: cc.SpriteFrame = null;

    // LIFE-CYCLE CALLBACKS:
    sprite: cc.Sprite;

    onLoad () {
        const canvas = this.node.parent;

        canvas.on(cc.Node.EventType.MOUSE_DOWN, this.platformCreate, this);
    }

    platformCreate(e: cc.Event.EventMouse) {
        if(e.getButton() == cc.Event.EventMouse.BUTTON_LEFT) {
            var node = new cc.Node("New Sprite");
            var sprite = node.addComponent(cc.Sprite);
            node.parent = this.node;
            
            this.sprite = this.node.getComponent("Platforms");

            sprite.spriteFrame = this.sprite.spriteFrame;


            sprite.node.x = e.getLocationX();
            sprite.node.y = e.getLocationY();
        }
}

    start () {

    }

    // update (dt) {}
}

Please correct the error.
I’m apparently very stupid.

Can’t you do

sprite.spriteFrame = this.spriteFrame

instead of

sprite.spriteFrame = this.sprite.spriteFrame;

No errors, but nothing works.

Can you do some debugging? Is the node with the sprite created? exists in the scene? Is in the correct position?
When you want to set the position use the setPosition(x, y) method instead on the x and y properties.
Also note that the position of the node is local, try to set the position to 0,0 instead.