Best index to query NFTs?

I'm building a dApp: a contract to mint some NFTs, and a React app to display the collection. here`s the github repository with the complete code.

I have a question about to query the data.

Does anyone have some idea which Value to use to query the entire collection?

I'm using 'Total Supply', here is the code I use in this part:

       const collection = [];

      for (var i = 0; i < totalSupply; i++) {
        collection[i] = {
          tokenid: i,
          addresssender: await vjkNFTContract.ownerOf(i),
          uri: await vjkNFTContract.tokenURI(i),

Everything works perfectly, but after Burning a token, the total supply decreases by 1, as expected, making my queue not show the last token anymore (not just the last one, but the value equal to the number of Tokens burned ) .

Can I queue using as parameter the tokenId from the last minted Token? I didn't find similar function within the OpenZepellin documentation.

I'm still writing the condition so that it doesn't create objects within the Array collections with null tokenURI(tokenId).

doesnt matter too much that way I use to query, array, object, map.. I still need a index. Something to serve as parameter, but that came from the contract it self, I tried totalSupply from ERC721 Enumerable, but not best after burn some tokens.