SAN FRANCISCO — Things should be dismal in Silicon Valley right now, with technology’s biggest companies under attack from regulators, lawmakers and even President Trump.

Not for Henrique Dubugras and Pedro Franceschi. The two Stanford dropouts, both 23, are the founders of Brex, one of the hottest young companies today. Their start-up’s mission? To provide charge cards to other start-ups.

“We knew that if we could build what we wanted to build, people would want it,” Mr. Dubugras said. “We never had questions about that.”

Mr. Dubugras, sporting a black hoodie and tortoiseshell glasses, was speaking from Brex’s new San Francisco headquarters, where an orange “511572” mural displayed the bank identification numbers that appear on all its charge cards.