Rashi from Hosheia
Afterwards the Bnei Yisroel will return and seek Hashem, their G-d and Dovid their king and they will fear Hashem and His goodness in the end of days. (In the days of Moshiach)
R’ Shimon bar Yochai said ‘In the days of Rechovam, the Jewish people rejected three things 1) the Kingdom of Hashem 2) the Kingdom of Dovid and 3) the Bais HaMikdash. Said R’ Shimon ben Menasya, ‘The signs of Geulah will not be shown to B’nei Yisroel until they return and cry out for all three of these things.
From here we see how closely the Kingdom of Dovid is linked to the sovereignty of Hashem. The Jews strengthened their attachment to Hashem by accepting the rulership of the Kingdom of Dovid.
In the same way, in the end of days (the Geula ha’asida, the days of Moshiach), the Jews will seek both the Kingdom of Hashem and the Kingdom of Dovid. The two are inseparable.
Sources: Rashi, Abarbanel, Metzudas Dovid