Programming/debugging connector for MCU - best practices?
When you don't have space or budget to include a connector or pin header for programming, the usual solution is to create some small exposed copper areas ("test pads"), connected on the debug interface pins of the MCU, then build a test fixture that uses spring loaded pogo pins to make contact with these.

One easy solution I have used for this in the past is that from Tag Connect. They sell pre-made cables with a pogo pin assembly on the end, and they provide a PCB footprint you can put on your board design with test pads and locating holes. This saves you the trouble of building your own test fixture, whilst still avoiding the cost of a connector on your PCB.

If you don't have a place for even that sort of footprint, you will need to fit in the test pads you need wherever you can on the board, and build a bed-of-nails style test fixture, with a board containing pogo pins in the right positions so that they can push against your PCB in the right places. Typically this also needs some mechanical arrangement to help align and move the two together correctly.