Earth is formed because of the big bang theory.
About 4.5 million years ago, the earth started as a ball of hot rock with an atmosphere composed of hydrogen. Its temperature is about 5000°C. As the surface of the earth began to cool down, materials from the hot interior of the planet were released in gaseous form to create the atmosphere made up of carbon dioxide and water vapor.
As the earth continued to cool down, the water vapor created the oceans about 3.8 billion years ago. The oxygen released from the evaporation of water created the atmosphere.
Due to the intense heat of the earth's interior, volcanic activities continued and magma or molten rocks formed the interior layers of the earth. The continuous cooling of the top layer of the mantle started the formation of continental crusts. The temperature continued to drop because the clouds of water vapor reflected some of the sun's radiation back into space.
As the earth cooled down, its crust became a layer composed of a few rigid and rocky plates moving in relation to one another. Even today, the earth is not a static body and it always changes
Hope it will help