Pfizer has reached an agreement worth up to $10 billion to buy weight-loss drug startup Metsala, ending a dramatic takeover battle after Ozempic maker Novo Nordisk tried to disrupt the process with a new unsolicited offer that was higher than Pfizer’s previous bid.