How do I make my label fit its text?

I am working on the credits for my mobile game and I have a license attribution thing at the end that is relatively long. On normal phone screen sizes it fits properly, but on notched phones, a big chunk of the end gets cut off and on tablets, there is a lot of empty space at the top and bottom. I had both the label and the content panel of the ScrollView for the credits set to the anchor preset which is anchored to the top of the parent but stretches horrizontally and I tried changing it so that they stretch vertically too and that did nothing. How do I make the text not get cut off or have a lot of extra space?

Search for “Rect transform tutorial”,Search for “Rect transofrm tutorial”

I eventually just clicked “Best Fit” on the text and now it fits properly. I was worried that it would look bad if it was a different size on different screens, but it doesn’t seem to be a huge problem.