You take several observations.
Specifically, each observation has to record the time, elevation, azimuth, range, and range rate. The range and range rate could be found by bouncing a signal off of the object. The time it takes the signal to return tells you how far away the object is. The Doppler shift in frequency tells you how fast the object is approaching or departing. If you can't bounce a signal off the object, you have to estimate the range and range rate by other means (brightness, etc).
Since the object is unlikely to have moved very far in one night from the observer's perspective, it's hard to make 'several' observations very quickly and the accuracy of the range and range rate usually aren't very good on the first observations. This is why you periodically get a warning of an asteroid that may hit the Earth at some date in the future.
The initial observations are just to give other astronomer's the objects location. Eventually, you have enough observations to plot a trajectory through the sky. Having lots of observations and plotting them out is the only accurate way to determine the object's distance and velocity (just like calculating a lot of answers for various values of x eventually gives you a curve or line that defines an equation).
It's also why eventually the warning about the asteroid that may hit the Earth is discovered to be a false alarm. A wide swath of possible trajectories is eventually narrowed down to the object's actual trajectory.