How to fix Error 524 error when making IPFS calls

I am making a marketplace for the sale of proprietary NFTs. That is, the user offers for sale his own NFTs associated to his account.

My main problem is with rendering. I make the corresponding calls to the tokenURI functions of the different contracts but the loading is always delayed with error 524.

I don't know how they solve this in other marketplaces. But there has to be a way to be able to render the metadata of the NFTs without these problems.