Is it? The only related info I could find is https://www.investopedia.com/ask/answers/012615/what-are-leg..., which says it _can_ be illegal (in the USA) if it is achieved through a merger.
https://en.wikipedia.org/wiki/Vertical_integration mentions quite a few examples of existing vertically integrated companies, mentions a few court cases, but doesn’t say it’s outright illegal.
Also, if vertical integration is illegal in the USA, somebody should tell Musk he should split up Tesla and SpaceX.