Ruth was a Moabitess who married into the tribe of Judah and became the great grandmother of king David.
Matthew 1:5 NKJV Salmon begot Boaz by Rahab, Boaz begot Obed by Ruth, Obed begot Jesse, 6 and Jesse begot David the king.
Jesus is descended from David and is heir to his throne.
Matthew 1:1 The book of the generation of Jesus Christ, the son of David, the son of Abraham.
Luke 1:32 He shall be great, and shall be called the Son of the Highest: and the Lord God shall give unto him the throne of his father David:
Ruth’s story is recorded in the book of Ruth in the Old Testament.
I hope this helps