HOUSTON -- - Minnesota's Joe Ryan hadn't allowed a home run since April 19 and had given up just four all season.
Bregman and McCormick each homered in the second inning and had two RBI and the Astros built an early lead and beat the Twins 5-1.
Bregman and McCormick connected off Ryan (7-2) to put Houston up 3-0 - and snap Ryan's career-best streak of six starts without allowing a homer.
"He probably made a couple of mistakes that we didn't miss," manager Dusty Baker said.
The Astros tacked on two runs in the third inning and that was plenty to give them their fourth win in five games.
Brandon Bielak (2-2) allowed three hits and one run with six strikeouts in 5 2/3 innings, helping the Astros bounce back after losing the series opener 7-5 in 10 innings.
"It's always good to get off to a good start and get the lead and the way Bielak was throwing the ball for us it was good to get him some run support early," Bregman said. "And he just attacked and pounded the strike zone early."
Minnesota rookie Royce Lewis doubled a night after homering with four RBI in his season debut after tearing the ACL in his right knee last May. It was the only extra-base hit for the Twins, who went 1 for 8 with runners in scoring position.
Bregman led off Houston's second with his seventh homer this season to make it 1-0.
There was one out in the inning when Ryan walked José Abreu. McCormick connected on his soaring shot to left field with two outs to push the lead to 3-0.
"Obviously, he has a good fastball but we're a good fastball hitting team," McCormick said. "He has a really good arm. He's been pitching great this year but we just come prepared and with good pitchers like that we come ready to play."
Houston hitting coach Alex Cintrón was ejected in the third inning after yelling at plate umpire Jerry Layne after Jose Altuve struck out looking for the first out of the inning.
Jeremy Peña walked after that before a single by Yordan Alvarez sent him to third. The Astros extended the lead to 4-0 when Peña scored on a single by Bregman.
Ryan walked Kyle Tucker to load the bases and a sacrifice fly by Abreu made it 5-0.
Ryan allowed four hits and five runs while walking three in a season-low four innings.
Bielak had walked two but hadn't allowed a hit until Lewis doubled to start the fifth. Christian Vázquez singled with two outs to score Lewis and cut the lead to 5-1.
He was replaced by Phil Maton, who struck out Lewis to end the inning.
The Twins had runners at first and third with two outs in the eighth inning, but Ryne Stanek struck out Lewis to end the threat.
Astros: RHP Jose Urquidy began throwing from 90 feet Tuesday as he continues to recover from a shoulder injury that has kept him out since May 1. Manager Dusty Baker said he's made a lot of progress in recent days but wasn't sure what the next step for him will be.
PUT A RING ON IT
Vázquez received his World Series championship ring in a pregame ceremony Tuesday night. Vázquez spent the last two months of the 2022 season with the Astros after a trade from Boston. It was the second ring for Vázquez, who helped the Red Sox to the title in 2018.