There is a de-facto limit on the total length of an URL [0] which significantly exceeds 255, and the path portion of an URL can be arbitrarily long within that limit, so using only subdomains would be unnecessarily limiting, and using them in addition would provide no further benefit.
From my understanding the domain could be 255 characters long.
https://a.lot.looooooooo(...)nger.than.looooooooo(...).ng