I used to avoid buttonholes on my modern sewing machine, but my Kenmore from the 1970s has a delightful attachment that makes lovely buttonholes of uniform size with ease.
First I set up the machine according to the manual:
The attachment screws into a small hole in the back of the machine bed.
Stitch width is set between 1 and 2. Feed dogs are down, so stitch length is controlled by the movement of the attachment, not the feed dogs.
The front of the attachment snaps over a tiny gear on the buttonhole plate which replaces the regular bobbin cover plate.
Now for the video of this beauty in action: