When putting multiline label (with linebreak set to Word Wrap) into a stack view, the label immediately loses the linebreak and displays the label text in one line instead.<
If you are create UI with only code Try it with this way
e.g
let label = UILabel()
stackView.addArrangedSubview(label)
label.widthAnchor.constraint(equalTo: stackView.widthAnchor).isActive = true
label.text = "blahblahblahblahblahblahblahblahblahblahblahblah"
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.layoutIfNeeded()