This is only because the term "city" is used inconsistently around the world. Bnei Brak is part of the district of Tel Aviv, and most geographers would consider it part of the Tel Aviv-Yafo urban agglomerations[1].
The absolute size of an area puts a ceiling on the density - roads etc take up space, and the larger the area the more likely it is to include freeways, or hit geographic features that limit density.
It would be better to think of it as a 7 sq km district, and as such its density (29,345 people per square km) isn't particularly high[2]. Looking at districts with similar geographic size Imbaba in Cairo is 8 square km and has a density of 177,038 per square km, or Güngören in Turkey is 8 sq km and has a density of 41,349 people per km. If we look at similar populations (204,639) then Manhattan Community Board 7 (population 207,699) has a density of 42,387 people per sq km, or Zaveri Bazar (pop 202,922) has a density of 114,001 people per sq km.
So yes, Bnei Brak is dense, but not especially so by comparable urban area standards.
[1] https://www.intechopen.com/books/urban-agglomeration/charact...
[2] https://en.wikipedia.org/wiki/List_of_city_districts_by_popu...