If your transactions in Metamask get stuck or get rejected, make sure your balance is adequate, and your gas price and limit is ok, you may have a problem with incorrect nonce value. That can be caused by a bug in Metamask where switching networks (from Ethereum to Avalanche, or from main net to test net) doesn't set the correct nonce value.
To remedy that, you need to reset your Metamask account, which causes it to update the transaction history (don't worry your funds and keys are safe) from the network and in the process calculate the correct nonce value.
To reset the account:
Click the account icon on the top-right corner of MetaMask
Scroll down and click Reset Account