Smart contract pattern
Now let us say there is a smart contract A that is minting lets say 1000 tokens in its constructor by inheriting the ERC20 smart contract. Also there is a smart contract B that wants to have those 1000 tokens that are minted by the smart contract A. However when deploying the smart contract A as we don't yet know the address of the smart contract B we cannot send it inside its constructor and hence B will not get 1000 tokens.
The solution for this is that deploy the smart contract A by passing the address of the deployer and hence the deployer account address will get 1000 tokens. Now deploy the smart contract B. Now inside the deployment script transfer the tokens from the deployer address to the smart contract B using the transfer function.
Hence now the tokens are present in the smart contract B