UBI increases aggregate demand, so as you point out it increases inflation. However, it doesnt increase individual demand equally. Rich people’s demand will increase fractionally less than poor people’s. This means consumption inequality will decrease. So the choice of how much UBI to give is a balance between the good of decreasing consumption inequality (us has too much) and the bad of inflation.