NYC Population: 8,804,190 residents.  In 2010, it is 8,175,133.

In 2017, the city (I think mean metro area) had an estimated population density of 28,491 inhabitants per square mile (11,000/km2), rendering it the nation's most densely populated of all municipalities (of more than 100,000), with several small cities (of fewer than 100,000) in adjacent Hudson County, New Jersey having greater density, as per the 2010 census.[248] Geographically co-extensive with New York County, the borough of Manhattan's 2017 population density of 72,918 inhabitants per square mile (28,154/km2) makes it the highest of any county in the United States and higher than the density of any individual American city.[249][250][251][252] The next three densest counties in the United States, placing second through fourth, are also New York boroughs: Brooklyn, the Bronx, and Queens respectively.[253]

The city's total area is 468.484 square miles (1,213.37 km2); 302.643 sq mi (783.84 km2) of the city is land and 165.841 sq mi (429.53 km2) of this is water.

Above is from wikipedia.

New York City Metro Area Population 2022 :  The current metro area population of New York City in 2022 is 18,867,000.

New York City's 38,242 people per square kilometer (how is calculated?) is most similar to Mexico City's 31,598 people per square kilometer.  src

Confusing: how the population density is calculated?   28,491 x 302 (land area) = 8,630,000


Hong Kong

The territory's 1,110.18 km2 (428.64 sq mi)[156] area (2754.97 km2[156] if the maritime area is included) consists of Hong Kong Island, the Kowloon Peninsula, the New Territories, Lantau Island, and over 200 other islands. Of the total area, 1,073 km2 (414 sq mi) is land and 35 km2 (14 sq mi) is water.[31] 

So NYC is only slightly larger than HK.

The Census and Statistics Department estimated Hong Kong's population at 7,482,500 in mid-2019.

So the average population density of HK and NYC is about the same.

Headline population density of about 6,800 people/km2 does not reflect true densities since only 6.9% of land is residential; the residential average population density calculates closer to a highly cramped 100,000/km2.


Singapore:

Land reclamation projects have increased Singapore's land area from 580 km2 (220 sq mi) in the 1960s to 710 km2 (270 sq mi) by 2015, an increase of some 22% (130 km2).[220] The country is projected to reclaim another 56 km2 (20 sq mi).[221] 

It (as a country) has the third greatest population density in the world

 

Areas and populations sourced from the United Nations, unless otherwise noted.

An * indicates Demographics of Country or Territory links.

Country (or territory) Population Area Density Sources
& Dates
km2 sqmi /km2 /sqmi
 Macau * 631,636 30 12 21,055 54,531 2018
 Monaco * 38,682 2 1 19,341 50,093 2018
 Singapore * 5,757,499 716 276 8,041 20,827 2018
 Hong Kong * 7,371,730 1,104 426 6,677 17,294 2018

African City Population

Bold represents largest city in country, Italics represents capital city.

Rank City Country Population Date of estimate
1 Kinshasa  Democratic Republic of the Congo 15,628,000 2022
2 Lagos  Nigeria 15,388,000 2022
3 Cairo  Egypt 10,025,657 2021
4 Giza  Egypt 9,200,000 2021
5 Dar es Salaam  Tanzania 7,100,000 2021
6 Khartoum  Sudan 5,989,024 2021
7 Johannesburg  South Africa 5,926,668 2021
8 Abidjan  Cote d'Ivoire 5,381,826 2021
9 Alexandria  Egypt 5,381,000 2021
10 Nairobi  Kenya 4,922,000 2021


https://worldpopulationreview.com/world-cities 

World City Populations 2022

What are the most populated cities in the world? Here is a list of the top ten most populated cities in the world:

  1. Tokyo (Population: 37,435,191)
  2. Delhi (Population: 29,399,141)
  3. Shanghai (Population: 26,317,104)
  4. Sao Paulo (Population: 21,846,507)
  5. Mexico City (Population: 21,671,908)
  6. Cairo (Population: 20,484,965)
  7. Dhaka (Population: 20,283,552)
  8. Mumbai (Population: 20,185,064)
  9. Beijing (Population: 20,035,455)
  10. Osaka (Population: 19,222,665)