President Trump upbraided the health and human services secretary on Thursday over his administration’s ban on most flavored e-cigarettes, a proposal that Mr. Trump had vacillated over for months but ultimately endorsed, according to three people familiar with what took place.

The call occurred during an evening meeting the president held in the Oval Office with a large group of campaign advisers, according to the people familiar with the events.

After one of Mr. Trump’s pollsters, Tony Fabrizio, described the importance of health care as an electoral issue, Mr. Trump reached for the phone on the Resolute Desk and called Alex M. Azar II, the secretary of health and human services.

“I never should have done this vaping thing,” Mr. Trump said, adding an expletive, according to two of the people familiar with what happened.