I read this novel about 20 years ago, and I'd like to identify it.
In the not so distant future, Earth society is collapsing due to rampant violence, crime, sociopathy and so on (the problems are purely sociological: there are no pandemics or nuclear wars or climate changes).
At the beginning of the novel, some families (about three or four) living in the same apartment building are discussing the deteriorating situation and the possible solutions.
One of the characters, who works in the space industry, talks about the ongoing efforts to colonize other planets, and the others reach a consensus that the best way to secure a future for their children is to leave Earth altogether, and make a fresh start. (I seem to remember that colonist ships are still very experimental, but using some of the characters' connections they can all secure a place on one of the next launches).
The narrative switches rather abruptly to the same few families living together in confined spaces for an extended period of time; soon the problems that they thought to have left behind start cropping up in their mini-society: paranoia, interpersonal conflict, fights to become the alpha male end up in several deaths.
I seem to remember that in the end only two characters remain, a male and a female, and even they are in an abusive relationship.
A big twist, possibly only implied, is that the families never left Earth, but simply sealed themselves in their building, isolating themselves from society but unwittingly carrying all of its problems with them.
Note 1: in the second part there are no other characters in the "ship" aside from these few families; the setting isn't a generational ship (it's about as big as a building, in fact) and the trip isn't supposed to last decades.
Note 2: the novel isn't High-Rise by J. G. Ballard.