First, you have to know what paint was there previously, and use a corresponding primer. If it was water-based latex that is going to require a different prep than if it was oil based. Also, make sure no layers were painted with lead-based paint. If so take proper precautions.
Prep is key. Sand down to a smooth surface, remove hardware and fill any holes or divots (like those left by old hardware you won’t be reusing). Use a shop vac and a tack cloth to get rid of all the dust before painting (or wipe down with a lint free cloth lightly moistened with mineral spirits).
An airless spray gun will give you the best results. You can rent them but if you are going to be doing this over a period of several weeks that won’t be cost effective. I seem them pop up on FB Marketplace every so often for cheap. Find a place with minimal dust/debris and do several light passes on each side. If you can’t get an airless sprayer (and I highly, highly recommend one for this kind of application) you can do ok with a roller with a smooth nap and a quality paintbrush. I’ve had best results cutting in the details first, allowing that to dry, then finishing the flat surfaces with the roller. But a sprayer is going to be your best friend here.
Finally, while the paint may dry in a few hours it will take up to a month to fully cure. Read the manufacturer’s use guides, but in general you want to give doors at least a couple days before re-installing and like shelves which will be in contact with items takes a week or more.