The U.S. national debt officially crossed $40 trillion on Tuesday, a milestone that arrived just as long-term Treasury yields climbed to their highest levels in more than two decades, adding to the mounting cost of financing America’s growing pile of borrowing.