The US president, long critical of the alliance’s reliance on US largesse, highlights aid provided to Ukraine in its war with Russia.