Merely taking religion in the modern world seriously makes “Ramy” an outlier, even in a you-can-say-anything-on-TV era. In HBO’s “Crashing,” Pete Holmes grappled with Christianity in the secular world of comedy, but it was just canceled after three seasons. Bridget Bedard, the showrunner of “Ramy,” came from “Transparent,” the most thoroughly Jewish show on TV, but that too is a rarity.

“Ramy” quickly becomes a rich, specific 21st-century American story. The fourth episode, a stunner, flashes back to 12-year-old Ramy (Elisha Henig) in school on Sept. 11, 2001, returning from a morning bathroom break to find teachers weeping and his classmates already looking at him differently.

The 10-episode season suggests that “Ramy” has plenty of room to expand. Two late installments focus on Dena, who chafes under her family’s paternalism, and Ramy’s mother, Maysa (Hiam Abbass, in a spectacular performance of her character’s loneliness both as an immigrant and as a mother of grown children). It’s a welcome break in a largely male-POV series.

“Ramy” is proof why better representation makes for better TV. It can tell deeper stories because no character has to stand in for an entire culture. Ramy’s boorish uncle Naseem (Laith Nakli), an anti-Semite who works with Jews in Manhattan’s Diamond District, would be dicey as the only Muslim in a series. Here, he’s one more difficult family member Ramy has to deal with.

And Ramy’s community in turn is only one aspect of the world of Islam, we see as he meets his Egyptian relatives, among them a cousin obsessed with Ashton Kutcher and elders who admire President Trump and believe that President Obama was a Muslim. (“His name is Barack Hussein Obama. What is he, Chinese?”) The encounter both broadens the world of “Ramy” and shows the character Ramy the gap between reality and his romanticized ideas about his roots.

“Ramy” pushes and prods; it’s not always comfortable. (The producers include Jerrod Carmichael, whose late “The Carmichael Show” made topical discomfort its brand.) Osama bin Laden (Christopher Tramantana) makes a surreal appearance. Youssef adapts a joke from his standup about how the day President Trump declared the Muslim ban was a great one for him personally. (“I killed it at this meeting. I found a MetroCard that had $120 on it.”)