I thought you said 10 kilometers across. There are large asteroids and comets hundreds of kilometers across but they don’t hit Earth, haven’t done so for over three billion years. Nor do they hit Mars or Mercury or Venus. Jupiter protects us from ones beyond Jupiter by diverting them or breaking them up and the asteroid belt is reasonably stable over the millions of years timescale, for the big asteroids.
Journalists often post artist’s impressions of huge moon sized objects hitting Earth. Those are not realistic in the modern day.
Instead think something the size of New York. You wouldn’t see it on an HD photograph of the world. Too small. Also, large asteroids even 10 kilometer in diameter, are rare. Only a 1 in 100 million chance of a 10 km asteroid hitting Earth this century and we’d expect at least a year or two of warming because they have already mapped all the ones in short period orbits, only leaving the comets. We could still be hit by a 1 kilometer asteroid, with not much warning, maybe a week or two but those are nearly all mapped out also, they find about one of those a month and should reach 99% complete some time in the 2020s of the ones in short period orbits, which is to say most of them.
However, to answer your question as stated, an object that big going close to Earth would tear it into rubble through tidal effects. It’s the same mechanism that raises tides in the sea. The tides are very dependent on distance, get less according to the sixth power of the distance,. Double the distance, and you have 1/64 of the tidal effect. So given that the Moon still causes quite large tides today, think how large they were when it was closer to Earth?
If you had a big planet that close to Earth it would just wobble itself to pieces like a jelly.
What matters here is the “Roche limit”, if the Earth is within 2.44 radii of the big planet then it will inevitably get torn apart if it stays within. Earth is o large that it’s effectively a fluid, no rock or metal is strong enough to resist the effects of gravity.
If it was just a flyby - really better described as Earth doing a flyby of the other planet and Earth passed just within the Roche limit then it might just wobble a bit and survive. The speed would matter also.
This animation gives an idea of what happens when a planet or moon gets within the Roch limit of another planet or moon.
This assumes that both planets have the same density. If the large planet has much less density than Earth, then its Roche limit for Earth might even be within the planet and then you are okay.
Calculation indented:
The approximate formula for the Roche limit is 2.44 R * (ρE/ρP)^(1/3) where ρEis the density of Earth and ρP of the planet. So if you had (ρE/ρP)^(1/3) = 2.44, i.e. ρE/ρP = 2.44^3 = 14.53 , i.e. that Earth is about 15 times more dense than the planet.
So if the planet was only a fifteenth of the density of Earth, than the planet,Earth could do a safe flyby without being torn apart, though it would of course get very elliptical in shape during the flyby.
Earth’s average density is 5.51 g/cm³ and Saturn’s is 0.687 g/cm³. So for Earth to survive the encounter comforgably it would need to be less dense than Saturn, it’s density needs to be (5.51 /15) = 0.367 g/cm³, nearly half the density of Saturn.
I wonder though, if a single flyby of Saturn just above the cloud decks is something Earth could survive? Saturn weighs about 95 times the mass of Earth, so a bit larger than you have in mind in the question.
One theory for Saturn’s rings is that it might have been caused by a large moon that got so close to Saturn that it tore itself apart through tidal effects (though there are other possibilities)
Rings of Saturn - one theory is that they are the remains of a large moon that came too close to Saturn and got torn apart. Alternatively they might have just never formed into a moon in the first place, and there are other ideas as well..
That is, unless they are tidally locked. If Earth was tidally locked to this larger planet, as the Jovian moons are locked to Jupiter, one face always facing it, then it would not tear us apart because there would be no tides. It would just pull Earth out into an ellipsoid shape.
But it is all theoretical, it ain’t going to happen. Not in our solar system. Though - amongst the 100 billion stars in the galaxy, who knows, maybe this is happening to a planet orbiting one of them right now.