New function

Hello Guys !
I have an NFT collection, and the ERC-721 contract, but I want to add a function of reproducing other NFTs automatically, afterwards; after the sale of the first NFTs! how to add it?
Thanks !