The Hammers put their Premier League struggles to one side as Benrahma's wonder strike against his old club gave them a 1-0 third-round victory.
"Getting through in any cup competition is important and we just about got there today," said Moyes.
"I think the result in midweek, a good draw at Leeds, and a good win here today is something to build on."
Substitute Benrahma struck with 11 minutes remaining after a thunderous challenge from Declan Rice on Yoane Wissa in the centre circle.
The ball fell to Benrahma, who strode forward before launching a 25-yard rocket into the net.
The Algerian, prised from Brentford for £30million three years ago, pointedly did not celebrate the strike, but his manager certainly did.
"I said last week we could do with someone scoring a screamer and Said did that," added Moyes.
"Said has done this in different games, come off the bench and had an impact. His impact was excellent. It was a terrific goal.
"And Declan's tackle? Wow! It 100 per cent gave me as much pleasure as the goal itself.
"It has been tough for him but he keeps at it and he's a huge influence in the team's performance. He's such a big player for us.
"I want a run in the cup, it would be a real bonus, for us but getting our Premier League position correct is the priority.
"It has to start somewhere and this was a difficult draw. We're thrilled to be through."