In SwiftUI you can use the .minimumScaleFactor modifier to automatically downscale text.
For example:
.minimumScaleFactor(0.5)
SwiftUI will automatically scale down the text to fit the available space. The value sets the minimum amount of scaling that the view permits. In this case, SwiftUI can draw the text in a font size as small as 50% of the original font size.