MEXICO CITY — Before the Dallas Mavericks’ weekend trip to Mexico, Cooper Flagg’s only previous experience in the country was a Cancún vacation.

This time, there were no tropical drinks adorned with umbrellas. Nor was there pool volleyball. This was a business trip. The Mavericks, who looked wobbly in a five-game homestand to start the season, needed a good result.

The Mavericks played as well as they have offensively all season for much of Saturday’s game against the Detroit Pistons. But in the fourth quarter, Dallas’ offense dried up. The Mavericks shot 4-of-16 from the field, committed seven turnovers and were outscored 35-17 in the final quarter of a 122-110 loss to the Pistons.

Flagg had a tough shooting night, converting just 3 of 14 shots on his way to 16 points. Through six games, he is averaging 13.8 points on 37.3 percent shooting from the field and 28.6 percent shooting from 3. The Mavericks are averaging 95.6 points per 100 possessions with him on the floor.

“It’s a tough league,” Flagg said. “It’s a transition. Obviously, I haven’t made a lot of shots or been as efficient as I want to, but I’m going to keep trusting the work. I’m not worried about anything. Got to keep being aggressive and trust the work. I think I’ll be fine.”

A lot of Flagg’s struggles can be explained by the situation he’s been put in. Mavericks coach Jason Kidd has refused to start a traditional point guard this season, instead opting for Flagg and P.J. Washington to shoulder the majority of ballhandling responsibility from the opening tip. The Mavericks aren’t loaded with outside shooting around Flagg, either.

All of that has contributed to Dallas ranking dead last in the NBA in offense. The team is averaging 104.2 points per 100 possessions at a time when every other NBA team is scoring at a clip of 106 points per 100 possessions or better.

Nonetheless, Kidd has remained resolute in the Mavericks’ “Point Flagg” approach, believing that the growing pains Dallas is experiencing will pay off in the long term.

“We are playing for something greater,” Kidd said. “Just to have that experience early on is a blessing.”

Kidd revealed before Saturday’s game that Kyrie Irving could return to the floor before 2025 is over. Even if Irving does play again toward the end of this year, the Mavericks have 20-plus games to worry about before then. They dropped to 2-4 after Saturday’s loss. If they keep going like this, the hole they’re in might be too deep to dig out of by the time Irving returns.

Flagg is one of the Mavericks players who could benefit most from having Irving in the lineup. Right now, he looks most comfortable as a finisher — not as an initiator. He has made 13 of 27 shots inside the restricted area this season. On shots outside the restricted area, he’s made 15 of 48.

“He’s learning quickly,” Shawn Marion, the former Mavericks great who attended Saturday’s game, said about Flagg. “You can see it. He’s trying to pick up everything on the fly. There are going to be some bad days. There are going to be some growing pains. You have to fail in order to get better.”

Flagg is one of three No. 1 picks on the Mavericks’ roster. Irving and Anthony Davis are the others. At media day in September, Davis remarked that Flagg was a part of an atypical situation compared to most other No. 1 picks.

“For him, he’s coming to a team that’s established,” Davis said. “We have veteran talent. He doesn’t have to do as much as a normal No. 1 pick has to do.”

So far, the last part of that statement hasn’t been true. The Mavericks are putting plenty on Flagg’s plate. He’s playing out of position at point guard as an 18-year-old.

Flagg’s numbers might not look pretty, but the Mavericks believe this will only benefit their basketball prodigy from Maine over the long haul.

“I think it will only help us in this marathon,” Kidd said. “To have another ballhandler who can make decisions when we are healthy.”