You don't specify how you build the button. But generally speaking UIButton/Button will automatically adjust the text to the frame so if the frame is tall and not very wide, it will accommodate, though you may need to set the number of lines to 0 so it doesn't limit it to 1 line if it defaults to that
But you know, to just raw answer your question and show you how it can be done, void of context - this is a way
As I was alluding to with my prior comment we’d need to know more about your development environment. Is this a SwiftUI or UIKit codebase?
If we’re talking about a UIKit UIButton then it has a titleLabel property that you can set numberOfLines on. I.e.
button.titleLabel.numberOfLines = 0