There is a lot of research on this just now. Almost all money spent on space is wasted. We are not going to New Worlds, and bring back gold, tobacco, and slaves. However, spotting an earth-hitting asteroid and deflecting it could give a return on our investment: maybe biggest return of all in saving the Earth and everything on it. So there is a lot of research on this just now. If this object appeared today, then we are probably boned, but we are working on the answers.
We still do not know what is out there. Most of the incoming stuff belongs to the solar system and Oort Cloud, so it is mostly about the ecliptic. Interstellar objects such as Oumuamua are much rarer. A lot of the spotting is confined to the ecliptic.
Oumuamua was a long, thin object with a low albedo. We saw that. We don't have enough big telescopes looking in all directions yet, but we could. Unless this is an attack on Earth, the odds of something travelling interstellar distances, then hitting the earth are huge.
It is hard to spot objects close to the solar disc. However, if we are making a spotter network, the logical thing is to put telescopes out at Lagrange points L4 and L5. The greater parallax gives greater precision on the trajectory predictions. The other advantage is that if the object is coming at us 'out of the sun', it would be sixty degrees away for the next telescope.
Extrapolating from your question a bit: suppose we had the defences against meteorites we are currently proposing, what naturally occurring and not wildly improbable object might take it by surprise?
A sun-grazing trajectory would be hard to predict. The object may be coming in fast towards the sun, then get deflected through a significant angle. If it has volatiles, it may outgas violently, changing its orbit when it is close to the sun. It may be around the back of the sun when this happens. We get to see the modified trajectory too late to do anything about it.