The victory clears the way for Friedrich Merz to become Germany’s next chancellor.