Why is the population density not the same everywhere?
Population density depends on many factors, here are the main ones:
Climate and relief. There are many places on the globe that are not suitable for life. The temperature does not allow there, the lack of water, or there is simply no way to grow food (arctic and tropical deserts, mountain peaks, etc.).
Economic and social development of countries. People strive to live better, therefore, there is a massive migration of residents of countries with a low standard of living to more developed countries. This all affects the population density. (A striking example of the role played by social development in population density is Germany, which has an area that is almost half the size of Ukraine, in contrast to it, has a twice as large population).