Does anyone know how to limit lines in a text? Thank you

Should I limit the text in a list or otherwise make it scrollable, does anyone know how?

Here is a tutorial:

Check out the “Get scores” scene of the Firebase leaderboards example, it has such a limited scrollable text.