Similar to the verification approach described in the hardhat verification plugin, you can verify the contract source code in the Sourcify as well by setting the following in the hardhat config file:
> npx hardhat verify --network optimism-sepolia 0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba 1234Successfully submitted source code for contractcontracts/Lock.sol:Lock at 0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Bafor verification on the block explorer. Waiting for verification result...Successfully verified contract Lock on the block explorer.https://optimism-sepolia.blockscout.com/address/0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba#codeSuccessfully verified contract Lock on Sourcify.https://repo.sourcify.dev/contracts/full_match/11155420/0xCD562a6426b474390A9E7e554b9B4f9f62Ea38Ba/