What vision does "the vision" in Daniel 9:23 refer to?
In the 8th Chapter and then in the 9th Chapter of Daniel, we are told of two visions, which although overlapping, as to the timing of both, are nevertheless distinct in their interpretation. The vision referenced in Dan, 8:1-14 is with regard to the vision of the "2300 evenings and mornings", an unmistakable reference to one Antiochus Epiphanes, the initial "Abomination of Desolation", a Grecian king who came to the throne in 175 BC, and who subsequently oppressed the Jewish people and desecrated their temple, within a period of 2300 days from 170 BC through 164 BC, or more than likely 1150 days, specifically from Kislev (December) 15, 167 BC, through to Kislev 25, 164 BC ( as determined in the "Books of Maccabees"), but this depends on one's viewpoint, which we don't need to go into here. The angel Gabriel then interprets the vision in Dan, 8:15-20;21-22;23-27.
In Dan,9:21, reference is made to the vision previously, i.e. the above. But, when in Dan,9:22,23, where the same messenger/angel Gabriel, speaks to Daniel yet again, with regard to understanding the vision, we then have to be talking about the subsequent verses, Dan,9:24-27, the "70 Weeks" prophecy in actual fact, a further vision in other words - although not a vision per se, more of a *revelation, important message respecting future events - within which we find a further, and distinctly separate, interpretation. This prophecy encompasses almost 5 Centuries, 483 or 490 years (depending on one's viewpoint on the "70th" week), commencing in either 458, or 457 BC (7th year of Artaxerxes).
Theories abound as to the timing of the 70th week, but what we do know, from Dan, 9:26, is that the Messiah (Jesus) is cut off (crucified), after the 69th week, and that subsequent to this monumental event, the city of Jerusalem and its sanctuary are destroyed, by IMO that second "Abomination of Desolation", ... the people of the prince, i.e. the Roman armies, headed by the princely general, namely Titus.
Conclusion
Dan, 9:23, has to be referring to the 2nd vision, if only for the fact that we have two distinct and separate interpretations, given by the angel Gabriel, which are more than a decade apart. Also, unlike in Ch.8, there is no instruction directed to Daniel, to seal up vision, in Ch.9. Ch.9, is referring to what Jesus is to achieve, by his death. One can speculate as to what Gabriel means by the time of the end, mentioned in Dan, 8:17; & 8:26, but to my mind, they seem to be referring to the restoration of the holy place, brought about by Judas Maccabeus, Dan, 8:14. 70 AD saw another end, as it were. Whereas, in Dan, 12:4 & 12:9, I think we are talking about a much later end time, which may, or may not, have already happened.
*revelation:- This revelation was, moreover, not communicated to Daniel in a vision, but while in the state of natural consciousness. Keil and Delitzch.
Also, if one was to go to - Biblehub.com - and type in Daniel 9:23, you can find other commentary, besides Keil and Delitzch. Commentary for instance, from the likes of Ellicott; Matthew Henry; Barnes; Gills; and Cambridge Bible for schools and colleges, where ALL, unequivocally stipulate, that the word "vision", heretofore mentioned, is in relation to the yet future "prophecy" of Dan, 9:24-27.