Goals from the Italian defender and Jarrod Bowen saw the Hammers move to within one point of the Champions League places with a 2-1 win over Aston Villa last night.
West Ham rode their luck in the second half and Villa striker Ollie Watkins missed a penalty before having an injury-time equaliser ruled out, after Ogbonna had pushed him into an offside position and the challenge was missed by VAR.
Moyes is starting to build something at West Ham and Ogbonna says the Scot is now helping their expensively-assembled squad realise their potential.
"The potential of the squad here has always been high, always," centre-back Ogbonna told Standard Sport.
"I want to give a big credit to the manager. Since he came in, he changed a lot of things: discipline, hard work and you can see on the pitch. He has a lot of credit on that one.
"Has he given us belief? Of course, of course. We want to achieve what we achieve in the future, I don't know what [we can do] but if we perform we can get good results. Sometimes we can be lucky, sometimes not. I think if you change your mentality something positive can happen."
Asked about the foul on Watkins being missed in the build-up to Villa's ruled out equaliser, which left visiting manager Dean Smith furious, Ogbonna said: "I think it is their problem. I don't know how football is going to be. The VAR decided that it was offside and we keep the offside and get three points and we look forward for the next game."
The Hammers will host the first Premier League game in front of fans since March on Saturday when they welcome 2,000 supporters back in to the London Stadium for the visit of Manchester United.
Those lucky enough to return will be witnessing a rather different side to that which last played in front of fans back in February.
Would they be forgiven for harbouring hopes of Europe this year? "That is their problem," joked Ogbonna. "Our problem is to... we can't wait to get the fans back in the stadium. The next game is going to be really important for us and we have waited for that. We want to enjoy the time and enjoy the fans. Our problem is to perform well.
"The target for West Ham is to keep the performance high, keep the standard high and then we will see at the end of the season."