It sometimes feels as if there is no getting away from Despacito. At more than 5bn views, Luis Fonsi and Daddy Yankee’s track is now the most streamed video of all time on YouTube. But there is plenty more where that came from: Puerto Ricans such as the Despacito duo were responsible for 27 of the top 100 most-viewed music videos on YouTube in 2017. Over on Spotify, four of the six most popular Latin artists are also Puerto Rican: Fonsi and Yankee again, plus Bad Bunny and Ozuna.

All this from an island of just three and a half million souls, plus the other five million Puerto Ricans who live in the US. How did they become such a colossal musical force?

“Puerto Rico’s relationship with music is everything,” says Bad Bunny, AKA 24-year-old Benito Ocasio, who is touring in the UK for the first time this summer and whose tracks regularly score more than 500m YouTube views. “It’s an island full of talent and if you grow up there, you grow up living and breathing music.”

For more than a century now, Puerto Ricans have been able to export this culture to the US, and from there to the rest of the world. “Puerto Rico is at a logistical point where they can use so many influences: from Europe, the US and south America,” Yankee says. But he also points out that Puerto Rico has an advantage when it comes to accessing markets in North America: “It’s part of the United States, we are American citizens, and that gives us a lot of information from around the world.

In 1917, the Jones-Shafroth Act made all citizens of Puerto Rico citizens of the US. This paved the way for artists from the island such as Héctor Lavoe and Tito Rodríguez, as well as Nuyoricans (a portmanteau of New York and Puerto Rican) including Tito Puente, Willie Colón and Ray Barretto, who brought Latin jazz and salsa to mainstream audiences. Their generation lived through the glory days of Fania Records, the legendary Latin label in New York, which was founded in 1964. Puerto Ricans have continued to dominate the salsa market, with artists such as Marc Anthony, who played Lavoe in the biopic El Cantante alongside his then wife – and fellow Nuyorican – Jennifer Lopez.

But while salsa is still huge in Latin America, it isn’t the driving force behind the current boom in music there. Instead, it is younger generations who continue to are developing new sounds as a result of immigration and cultural exchange: first, house and Nuyorican soul in the 1990s and, today, reggaeton and Latin trap.

Reggaeton, a fusion of Spanish-language reggae, Caribbean dancehall and US hip-hop, broke into the international market in 2004, after NORE’s Oye Mi Canto, which featured Yankee, Tego Calderón and Nina Sky, went to No 12 on the Billboard Hot 100 and Yankee released the ever-crescendoing Gasolina. The Puerto Rican authorities had earlier tried to clamp down on reggaeton, which was seen as immoral, misogynistic and violent. In 1995, police raided six record stores around the capital, San Juan, confiscating hundreds of CDs and cassettes, claiming that they were breaking local obscenity laws.

Yankee remains the most popular Latin artist in the world, but younger figures such as Ozuna and Bad Bunny are behind the latest big trend: Latin trap, a fusion of reggaeton and trap music, a harsh rap subgenre from the southern US. There is, however, a hunger in these artists to continue redrawing the boundaries. “I define my music with the word unique,” Bad Bunny insists, with a rapper’s typical bravado. “I work hard to be able to set myself apart from everything else that’s going on in the trap genre.”

Puerto Rico’s proximity to the US has made it easier for artists to experiment with new styles, but Angel Kaminsky, executive vice-president for Latin America at Universal, nods to technology’s role in bringing this to new audiences. “Streaming has been fantastic as it has lowered the barrier – combined with social media, artists can connect directly with no boundaries,” he says. Yankee agrees this has transformed the scene. “Thanks to the musical platforms and social media, music can travel faster,” he says. “We don’t depend on an executive to decide if he likes the song or not. That’s been key in our success.”

Cardi B performs with La Modelo with Ozuna at the Billboard Latin Music awards in April. Photograph: Eric Jamison/Invision

With more and more people listening to Latin music, artists and record labels are aiming high. “A few years ago our goals were just to have a big summer song,” says Kaminsky. “Latin music was always associated with the summer – now we expect global reach all year round.”

Cross-genre collaborations between US and Latino artists have helped – Ozuna worked with rapper Cardi B on La Modelo and broke the Billboard chart for the first time, while Bad Bunny’s collaboration with her topped it; Fonsi had success with Échame la Culpa, featuring Demi Lovato. Even Beyoncé has jumped on this trend, remixing Colombian J Balvin’s super-successful track Mi Gente and donating proceeds to those affected by Hurricane Maria, which devastated Puerto Rico last year.

She was not the only one who saw how Latin America’s cultural exports could be leveraged to offer support in the wake of the disaster. Lin-Manuel Miranda, the Pulitzer prize-winning creator of the musical Hamilton and proud Nuyorican, brought together musicians such as Lopez and Rita Moreno to release a charity track called Almost Like Praying, whose moving lyrics feature a roll call of the 78 towns in Puerto Rico.

While the US president, Donald Trump, picked fights with the mayor of San Juan, Carmen Yulín Cruz, and threw paper towels into crowds on his visit to Puerto Rico, numerous other artists rose up to support the relief efforts. Yankee donated more than $1m (£756,000) and helped out in food banks; Ricky Martin, Anthony and many others gave donations and set up websites to collect them.

Puerto Ricans, then, are using music to influence the world, not just reflect it. Voices such as Miranda’s are heard even in the White House, whether he is performing in front of Barack Obama or tweeting criticism of Trump. Interestingly, he is a descendant of Gilberto Concepción de Gracia, founder of the Puerto Rican Independence party, which has been campaigning for “freedom” from the US since 1946. So is the Puerto Rican rapper Residente, formerly part of the group Calle 13, who has won more Latin Grammys than any other artist. “We were born with revolution in our veins,” says Miranda on the first track of Residente’s self-titled 2017 album. Up-and-coming rapper PJ Sin Suela has been hailed as Residente’s protege and has similarly used his music to express his political opinions. “Fuck Donald Trump: you don’t represent my morals or my people,” he says on his track Vivo.

At a time of growing concerns about racism in the US, Puerto Rican musicians are making sure their voices are heard. “I grew up in a rural area called Vega Baja and I’m the first of so many talented people in this area to make it out,” says Bad Bunny. “I take great pride to represent where I come from and I am able to show my fans, and everyone who listens and watches me, that anything is possible. If a small-town boy like me who bagged groceries was able to make his dreams come true, you can too.”

They may have taken their music to the world, but it matters more than ever that Puerto Ricans remember where they are from.

• Bad Bunny performs at the O2 Forum Kentish Town, London, on 4 August. Daddy Yankee is at the SSE Arena, Wembley, in London on 10 August.