Not two weeks after his 18th birthday, Heliot Ramos huddled in the bathroom of his family home in Puerto Rico with his parents, grandmother and uncle as Hurricane Maria unleashed its worst on the southeastern part of the island. The front door of the house was straining against its hinges. They could hear it rattling.

Baseball helped keep them safe.

Long before the Giants selected Ramos in the first round of the 2017 draft and signed him to a $3.1 million bonus, his brother Henry signed with the Red Sox for $138,000. The family used some of that money to build a rare concrete house in the mountains of Matuyas Alto.

The uncle’s house next door was made of wood. It vanished.

As Heliot and Henry Ramos train in Orlando for the 2018 season — Henry is in the Dodgers’ organization now — their family remains in Puerto Rico in a house with no power more than two months after Maria roared through the island Sept. 20.

They still might lack power when Heliot reports to the Giants’ minor-league spring training in March, or another team’s camp if he is traded as part of their big-league remake. The Marlins reportedly want him in a deal for Giancarlo Stanton.

Heliot’s agent, Willie Joe Ronda, said electricity in the mountains of southeastern Puerto Rico might not be restored for a year.

This was the devastation that Ramos, his family and homeland faced after a happier summer in which he blistered the ball for the rookie-league Arizona Giants. Still 17, the right-handed outfielder batted .348 with 11 doubles and six homers in 35 games before a concussion ended his first professional season.

This was the reality that persuaded Ramos to withdraw $5,000 of his bonus money to buy food, medicine, generators and other supplies for the 150 to 200 families that live in Matuyas Alto, a remote neighborhood of the city of Maunabo.

Ramos and Ronda had a conversation in Arizona when Ramos returned for the fall instructional league in October, a journey delayed by the hurricane.

“Heliot had just turned 18 and it kind of surprised me,” Ronda said from his home in Puerto Rico, which also lacks power. He was speaking over a Wi-Fi connection.

“He asked me a question: ‘How much do you think it’s going to cost to fix this?’ I didn’t have an answer for him. I didn’t have a number for him. You don’t see a guy that young at least thinking about how to help. He knows how important it is.”

Ramos, sounding much older than his years over the phone, said, “When you saw your people, people you grew up with, in this situation, you have to go in and help. You can’t think about it.”

The $5,000 that Ramos spent was part of a much larger outpouring of support from baseball for victims of Maria and a major storm that preceded it, Hurricane Harvey, which caused so much damage in Houston, the Gulf coast and the Caribbean.

After Harvey, Major League Baseball and the players’ association jointly committed $1 million for immediate aid. They added more after Maria.

Houston designated hitter Carlos Beltrán and his wife, Jessica, committed $1 million of their money and raised more through a crowdsource campaign that they sponsored to aid Puerto Rico.

Quietly, the Baseball Assistance Team, a charity funded by current big-leaguers and headed by former Giants outfielder Randy Winn, has distributed $256,000 to 52 families that needed immediate assistance following the hurricanes. BAT specifically aids current and former players, coaches, scouts, umpires and others in what Winn calls “the baseball family.”

BAT still has a representative in Puerto Rico attempting to contact baseball employees who might need help and cannot send an email for lack of power and cell service.

Major-league teams individually have reached out to employees who live in the affected areas.

Also, the Giants are part of a Bay Area business consortium that met last week with Lin-Manuel Miranda, the creator of the musical “Hamilton,” who has launched a significant effort throughout the United States to help raise money and awareness of the challenges Puerto Ricans will face for months.

When the fall instructional league ended in late October, Ramos returned to Puerto Rico to buy the food and supplies, which he helped deliver to his neighbors.

“Some people said, ‘Thank you, we had nothing to eat,’” he said. “It was hard to see my people like that.”

It also was hard just getting to San Juan to catch a flight back to Arizona for the instructional league days after the hurricane. Some 12 miles of road between Matuyas Alto and the main highway to the capital were blocked by debris.

So the day before the trip, Ramos and Ronda said, a platoon of relatives and neighbors armed with saws and machetes drove down the road to clear it so Ramos could make his flight. Even so, with debris, traffic and long gas lines on the main road, a trip that normally requires 60 to 90 minutes took four hours.

Ramos is in Florida with his brother because all involved, including his family, understand that preparing his body for his first full season in professional ball is a priority.

His parents, Norma and Pita, are staying in Puerto Rico in a house with no power because, Ronda said, they are too set in their ways to move and need to care for Heliot’s uncle and elderly grandmother. They will fly north for a Christmas visit.

Whether Ramos is still the Giants’ most promising prospect Dec. 25, or property of another team, remains to be seen. He is prime trade bait, and when the agent asked Giants officials where they stood on Ramos, they would not commit.

Ramos’ rookie-ball season ended prematurely in August when he was hit by a pitch and concussed, a Giants epidemic. Before the organization let him go home to Puerto Rico, it brought him to San Francisco for tests to be ultra-sure his symptoms were gone.

He says they are. He can work out with no ill effects. He also insisted he is not stressing about trade rumors, singing a familiar refrain.

“That is out of my control,” Ramos said. “I’m just focused on being a Giant and getting on the road for spring training.”

Henry Schulman is a San Francisco Chronicle staff writer. Email: hschulman@sfchronicle.com Twitter: @hankschulman