https://opensea.io/blog/announcements/introducing-the-collection-manager/
The new collection manager allows creators to make NFTs without any upfront gas cost, as the NFT isn’t transferred on-chain until the first purchase or transfer is made.
We call this lazy minting.
Anytime a write happens to the blockchain gas fees have to be paid.
There is nothing special about OpenSea's smart contract that allows them to avoid paying gas fees up front when creating the NFT.
OpenSeas creates an NFT, but defers writing to the blockchain until time of purchase. At that time gas fees imposed on the buyer to assign ownership of the NFT. The approach encourages sellers to list more items because they will not need to pay any fees up front.
Some users may object to this because if an NFT isn't written to the blockchain, then they do not consider it a real NFT because the non-fungible aspect derives from being written to the blockchain.