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?