If the digital file in IPFS is deleted or the IPFS provider goes offline, how can we ensure the persistence of NFTs?

The InterPlanetary File System is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. Being a p2p network, chances are low for IPFS to go offline. However, you can host your own IPFS node and save the files in this node. Make sure to pin the NFTs files. Pinning a file tells IPFS that the data is important and shouldn’t be removed when the node is near its disk space limit. By doing so, you can ensure the persistence of the NFTs.
Also, you can use the infrastructure responsibility to a remote pinning service. Remote pinning services like Pinata and Eternum provide redundant, highly-available storage for your IPFS data, without any vendor lock-in.
You can also use a service from Protocol Labs called to get your data into IPFS, with long-term persistence backed by the decentralised Filecoin storage network. To help foster the growth of the NFT ecosystem and preserve the new digital commons of cultural artefacts that NFTs represent, provides free storage and bandwidth for public NFT data.