It was not obvious for the first, which is not designed to detect moving objects. But in his case, it is possible that his instruments will help to learn more regarding the chemical composition of the asteroid.
As for Hubble, it was unlucky to have the Earth between Dimorphos and it at the moment of impact. But he took photos followingwards, showing the expanding cloud of debris.
What impact on the orbit of the asteroid?
In theory, all this data on the dust column or plume should help to learn more regarding the structure and composition of Dimorphos.
But ultimately, it is the impact that this collision will have on the orbit of this “moon” around its asteroid – 11 hours and 55 minutes for the moment – which remains the raison d’être of the mission.
A change, however small, might reveal how much force would be needed to divert an asteroid from its course towards us – if such an operation ever proves necessary.