Communism intends a society where money and a class system are abolished and a new society is built.
UBI supposes a society where capitalism still exists – But you get an allowance for existing and can take on a job as an option to get more money for said capitalism.
Neither could happen in reality without some billionaires being slaughtered, but the latter has a far less lofty goal, in that it doesn’t seek to rebuild society in an entirely new paradigm, only to make the “work or starve” paradigm of Capitalism less pressing.