The advice not to go out really has gone a bit insane - the idea is to avoid high risk areas where your puppy may pick up infection.
Pick somewhere relatively clean, ie a tarmac area that gets washed clean by rain, and isn't covered in dog turds, or a grassed area that is regularly mown and not covered in turds.
As you are in a flat then do you have a balcony, if so, put a tray with some turf out there.
Take him out - take him out A LOT, carry him everywhere, put him down in CLEAN places like friends houses, fields and parks that are NOT covered in poo..
Socialisation and habituation is really important - a lack of socialisation, and the behaviour problems that causes, kills MORE dogs than all the diseases we vaccinate against put together (And that statement comes from veterinary behaviourist Ian Dunbar, not me.. ) - so just exercise common sense about where he goes and who he mixes with, but certainly do NOT keep him in until his vaccinations are complete.
I understand what vets say - however vets are not behaviour experts and vets rarely have to deal with the fall out of behavioural problems except when it comes to putting the poor dog down.
Obviously don't let your dog mix with other dogs that are ill or dogs that you don't know, or in places you suspect to be filthy (btw, do NOT put your puppy down on the floor in the vets, thats probably THE germiest place going even if they do clean up twice a day!).
Finally - remember that socialisation/habituation doesn't just mean exposing your puppy to everything, it means pairing that exposure with high value reward - theres a truck, have a spot of cheese spread, theres a person - cheese spread - theres a cat - cheese spread - etc, EVERYTHING needs to be paired.
It is easy to forget to do this because a new puppy will just take on everything without really making a fuss, but hte key point is they MUST form a POSITIVE association - without it, that experience is in the database as 'unlabelled' and when it pops up again and the pup is at the stage when they can feel fear.. without that label 'THIS IS GOOD'... you'll get fear!