Start from the job, not the look
Every breed on this site was shaped for a task. A Border Collie was built to work livestock all day under direction. A Husky was built to keep pulling without being told. A Beagle was built to follow a line and disregard you while doing it.
None of that switches off because the dog now lives in a flat. The job is the dog's default behaviour, and your household either gives it an outlet or receives it in some other form.
Ask the honest questions
How many hours a day will the dog be alone? What does your bad week look like, not your good one? Is anyone in the house unable to be knocked over? How much grooming will genuinely get done in month eight, not week one?
Answer those first, then look at which breeds fit. Doing it the other way round is how people end up with a working-line Shepherd in a one-bedroom flat.
Health is part of the choice
Some breeds carry known, well-documented risks — respiratory limits in flat-faced dogs, spinal disease in long-backed ones, heart conditions in certain toy breeds. None of that makes a breed a bad choice, but it should be a decision you make with your eyes open, including what it may cost.
Ask any breeder which health tests they run and to see the results. A breeder who is not tested-and-open about it is telling you something useful.
This is general guidance, not veterinary advice. If your dog is showing fear, aggression, or a sudden change in behaviour, speak to your vet before starting a training plan.