Look like you ran put of gas, before you swap your eth you need to check gas fees on Gas fees tracker ( visit etherscan ), then before executing the swap you need to set your gas limit and the gas you want to pay. Calculate it then you will get how many token you can buy minus gas fees.