If a size 38 fits the shoulders but is to tight around the waist and a size 40 is correct around the waist and is too wide in the shoulders, than you have chosen a suit with the wrong "drop". The drop is the number of inches the waist is narrower than the chest. In an athletic fit the drop might be 7", in a slim fit it's usually 6". That means a 40" chest comes with a waist of 33" or 34" respectively. For bigger waists you need a lesser drop as not everybody with a bigger waist, is taller and sports broader shoulders. You can buy suits with a drop 4" or 5", if that is what you need. In the old days they would have produced suits in "portly" and "stout" with a drop of 2" and nil. I hope you are not that big. Some retailers offer you to chose jacket and trousers in whatever size required. But that is only a compromise. Someone with a huge belly needs a differently cut jacket (with more material in the front as to be able to close the buttons). I'm not US based, so I don't know which American suits are quite generous in their cut. These makers are more likely to be conservative and not the most fashion-conscious of manufacturers. A good alteration tailor should be able to take the shoulders in (re-cut them), although that's a pretty big job and it won't be cheap.