Unfortunately, once your wallet has already been hacked and the NFTs or cryptocurrency already stolen, there's not much we can do on our end. The best thing to do if you suspect your wallet has been compromised is to quickly move your other NFTs and cryptocurrency to a brand new wallet.
You can use tools such as Famous Fox Federation's mass-send tool to mass-send your NFTs in one transaction. This speeds up an otherwise time-consuming process.
It's best to just discard and never use your old wallet again. Assume that the exploiter has obtained full control of your seed phrase and/or private key, granting them access to your wallet indefinitely.
The best protection is prevention. Although some zero-day exploits can't be foreseen or avoided entirely, you can still get far by following Web 3 security best practices.
Buy a hardware wallet to store your valuable crypto-currency and NFTs. Never connect this wallet to anything. Instead, transfer your NFTs or cryptocurrencies to a "hot wallet" when you need to actively use or trade them.