The simplest way is to use Hardhat to deploy and verify. See How to verify a contract on Etherscan/BscScan/PolygonScan