This topic goes back a long time, and is referred to as the Lord's prayer doxology. You will find lots of info online by searching that phrase.
>There are basically two issues at play. One is simple and the other is complicated.
>a) As a matter of tradition, the line was used in worship from the earliest times
>b) As a matter of debate among biblical scholars, it involves the history of the texts of the Bible as well as the history of the Protestant Reformation.
https://pastortimlecroy.com/2012/09/06/long-ending-lords-prayer/
https://jashow.org/articles/for-thine-is-the-kingdom/