The great-impact theory is widely accepted for the formation of moon. If Theia (often described as a Mars-sized rock) really crashed into Earth, did that make an impact on Earth's axial tilt?
Theia is a hypothesized ancient planet in the early Solar System that, according to the giant-impact hypothesis, collided with the early Earth around 4.5 billion years ago, with some of the resulting ejected debris gathering to form the Moon. With that, it also changes the axial tilt of Earth. From a The Washington post article:
Scientists estimate that Earth suffered around 10 of these giant collisions. Each altered the tilt of the Earth by knocking it one direction or the other. In the last of these encounters, a rocky orb roughly the size of Mars smashed into the Earth. Upon impact, Hamilton said, it would have been traveling more than 10 kilometers per second, fast enough “that it would have melted everything. So immediately after the impact, you have a molten Earth that’s rapidly cooling.”
This impact was the last to alter the tilt of the Earth. Today, instead of rotating upright, the Earth’s axis is tilted 23.5 degrees. The angle varies a little over time, but the gravitational pull of the moon prevents it from shifting by more than a degree or so. This tilt is what gives us seasons.
This was more elaborated in an Inverse article which highlighted the research of a study from University of Maryland. It hypothesized a new model where the Earth tilted around 70-75 degrees on sudden impact but changed its tilt to 23.5 degrees over time:
In the old model, Earth's current axial tilt of 23.5 degrees resulted from the angle of the collision that formed the moon, and has stayed that way through time. Over billions of years, Earth’s rotation slowed from five hours to 24 as tidal energy was released.
The new model is a lot more complicated, but it explains things that couldn’t be explained by the previous one, especially the moon’s orbital tilt. In this model, after the big whack, Earth spun around every two hours and was tilted a dramatic 70 degrees. This helps support evidence that the collision that formed the moon would have had to have been extremely violent — violent enough to turn most of Earth into a cloud of vaporized rock, which explains the similar composition of the Earth and the moon.
Collisional physics suggests the moon would have condensed from the vaporized material along Earth’s equatorial plane, and then transitioned to its ecliptic plane over time because of the sun’s gravitational pull. But in this scenario, with a highly tilted and fast-spinning Earth, that doesn’t happen right away. Instead, tidal flexing that resulted from the moon’s varying distance from the Earth kept the two locked in a sort of stalemate, which could have lasted millions of years.
Through this period the Earth’s rotation would have gradually slowed, until the stalemate was broken and the moon proceeded to travel out towards the sun. This would have caused a righting of the Earth’s axis, and the moon would have oscillated back and forth across the Earth’s ecliptic plane, with these oscillations growing smaller over time as the moon moves further from Earth and energy is dissipated through tides. The moon’s current five-degree tilt of the ecliptic plane is an expression of that continued oscillation.