Mahrez has had limited game-time since City broke their club transfer record in July by signing him from Leicester for £60million.
But the Algeria international claimed his first City goals on Saturday as a second-half brace helped the Premier League champions demolish Cardiff 5-0.
"It's not been a tough time for me," Mahrez said after scoring two in a league game for the first time since Leicester's title-winning season of 2015-16.
— Manchester City (@ManCity) September 22, 2018
"When you arrive at a big club you have to adapt to the style. The manager (Pep Guardiola) has helped me a lot, and in the last two weeks I have felt a lot better.
"You can see that on the pitch. I never complain, I just work hard in training, and it's paying (off) now.
"But I have to keep going – scoring is not a final thing.
"The style of play is different, but I stayed at Leicester for nearly five years and knew I would need time to adapt at a new club like City."
City were already 3-0 up and cruising through first-half goals from Sergio Aguero, Bernardo Silva and Ilkay Gundogan before Mahrez's introduction just after the hour mark.
Mahrez opened his City account within six minutes – "the first time in my career I have scored a tap-in" – before a customary left-footed drive from the 27-year-old completed the rout in the final moments.
It was no exaggeration to suggest that City could have doubled their winning margin, and the performance was an emphatic response to their shock midweek Champions League defeat to Lyon.
"The manager told us it's always good to refocus properly because whether you win or lose, it is always difficult after a Champions League game," Mahrez said.
"It's another game, another atmosphere, and coming away in the league to a place like Cardiff, you need to be on it from the beginning.
"When you win you are on top of everything, and when you lose they put you back down straight away.
"That's why you have to stay strong mentally and always be the same, to keep going every game."
Cardiff's defeat was their heaviest during Neil Warnock's two years in charge and dropped the newly-promoted Bluebirds in to the relegation zone for the first time this season.
After successive defeats to Arsenal, Chelsea and City, the importance of next weekend's visit from Burnley can not be understated.
"Burnley is massive now," said Cardiff defender Greg Cunningham. "They won this weekend but they've had a slow start by their standards.
"We have to start getting some wins on the board and try and make the Cardiff City Stadium a fortress.
"Against top-six opposition you are going to struggle and find it hard, but we need to win against the teams around us."