Let's look at how to check whether the contract is an NFT contract on the Ethereum mainnet (or EVM chains).
The ERC-721 standard is intended to be implemented by implementing the EIP-165 interface.
And EIP-165 has a supports Interface function, and if you enter 0x80ac58cd, which is the NFT interface ID, and return true, you can confirm that it is an NFT contract.
As shown in the image above, the ERC-721 Contract will have supportsInterface function, and returns True when interfaceIddp 0x80ac58cd is entered.
When I call it from the famous BAYC Contract, it returns true as expected..!!