I'll preface this by saying that I don't smoke. Never have, never will, and I absolutely despise the smell of it. It's the main reason I left home so early. To get away from the smell of cigarette smoke (all my family, except me, smoked). HOWEVER, what people legally choose to do in their own homes (owned or rented) is entirely up to them.
I live on the ground floor in a small, 4 flat block and one of my neighbours smokes (not sure which one, but I suspect it's the guy opposite). I can't smell it in my flat, except occasionally in the hallway near the front door, but I suspect that's because he probably smokes as he's entering/leaving the building, so it seeps in slightly as he's passing. I don't tend to sit in my hallway so it doesn't bother me, and to be honest, even if I could smell it in my living room I still wouldn't be complaining about it unless they were standing smoking outside my front door in half an hour shifts! I'd simply take steps to try and keep the smell out (draught exluders etc). So many people here saying you shouldn't be smoking in your own home? How ridiculous! You know it's a filthy habit and you know it could kill you but it's your home, your body, your choice 🤷🏼♂️ You could take proactive measures and draft seal your home as well as you can (not only will it help stop the smoke escaping, it'll save you money on heating). But no one has the right to tell you what you can or can't do in your own home. Even if it's only rented, unless it's specifically a no-smoking rental, you can smoke in it.
As for the communal garden, that's a compromise situation. Depending on the size of the garden, depends whether you should refrain from smoking if other residents are out there. My communal garden is rather large, so even if someone is sat smoking in the centre of the garden, their smoke wouldn't bother anyone sitting near any edge. Obviously, you shouldn't smoke too close to the flats, (especially if windows are open), too close to the garden next door, if children are in the garden
or if standing/sitting too close to one of the other residents. That's just common decency and manners. Otherwise, smoke away. It's outdoors and the smoke will disperse.