Fetching Nfts with token uri

When i fetch nfts, I got this error. Why?

const fetchMetadata = await fetch(token_uri);
const data = await fetchMetadata.json();

Access to fetch at ‘https://ipfs.moralis.io:2053/ipfs/QmPks8rqo7MhLYd4jN4XyWqKcywEKjsrjs6EECyyTVQkLL’ from origin ‘http://localhost:3000’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

You can try with another public IPFS gateway like ipfs.io or cloudflare. You have to change the prefix.

You can also try to read it with a cloud function.