Charge for unfinished task

I tried to trade crypto on MetaMask but the transaction was not performed and I was charged. is that how it is done?