I lived in a typical two up/two down apartment complex for a couple of years, a few years ago. Two apartments upstairs, two apartments downstairs, drywall in between the apartments on the same floor. Then stairs/corridors between the sets of four apartments for an 8-unit building. There were 20 or 25 such buildings in the complex. The buildings were all brick on the outside. Thus the only area of real concern was the wall between the apartments on the same level.
So when I moved in, I set up the furniture so that when I rolled out of bed opposite the door to the bedroom, my back was to the wall between my apartment and my neighbor's. I had the bed between me and the door, and the wall (with no doors or windows, what's sometimes referred to as a 'friendly wall') behind me.
The only shotgun I had at the time was a Remington 870 Express Turkey gun, 21" VR barrel with RemChokes and two beads, and it was loaded with my then-favorite load, Estate's SWAT low-recoil 00 buck 9 pellet. Out of a modified choke, it delivered nice tight patterns in a reliable manner.
I harp a lot about having a home defense plan. Part of that plan IMHO is controlling your exposures and preparing your fields of fire in advance. Shooting through a wall into my own living room would not have been a problem, and any miss toward the BR door would have gone into the LR and then been stopped by a solid brick wall with no windows on the other side, if it got that far through the drywall between BR and LR.
An entry via the one BR window would have meant a raking shot down a wall faced on the inside with drywall that was brick on the outside also. Ever shot drywall at a fairly flat angle with buckshot? It tends to skid or skip a lot instead of penetrating, and flies down the wall more or less parallel with the wall. Then it would have encountered the wall between the BR and the LR, had it penetrated there then it would be on to the the brick wall with no windows on the other side of the LR.
Every individual situation is different, every building is built differently. Unless you are a slave to fung schwei, you can arrange your furniture to take the best advantage of any defensive options your apartment gives you.
If you live in a cardboard and vinyl siding construction like so many are today, then it might not be a bad idea to consider birdshot as a defensive load. But be prepared to shoot more than once if it's necessary. Even with buckshot, no one should have to tell you to RUN THE BOLT and be ready to shoot again if necessary. If you use a pumpgun, running the bolt as soon as the hammer falls should be instinctive- it should require no thought or deliberation.
Birdshot WILL kill at close range. I've zipped up body bags on people killed by birdshot in my short career as an EMT. But it might not always STOP, especially with peripheral hits.
If you have to shoot birdshot for a defensive load (and even if you can shoot buckshot), practice enough to be able to get good center hits UNDER PRESSURE, and always always always be ready to shoot again instantly if necessary. If your target is "the black hoodie" and if there is still a black hoodie in front of your muzzle after you fire the first shot and run the bolt, SHOOT AGAIN INSTANTLY.
Set your mental default to shoot till the designated target (gray sweatshirt, red tee shirt, whatever it is) is no longer in front of your sights when you recover from recoil. And be ready to engage multiple targets if necessary as well. Your gunfight is going to be what it is, not what you want it to be. And it might not be over with one shot. Best not plan on that being the case...
Train and practice, and Stay Safe-
Mindset - Skillset - Toolset. In that order!
Attitude and skill will get you through times of no gear, better than gear will get you through times of no attitude and no skill.