Welcome to the Community - Look at the datastore where tthe VM is stored and make sure there is sufficient room to create the swap file - the swap by default is equal to amount of memory assigned to the VM minus its reservation.
I am also moving this to a more approroiate forum