As usual, ExteriorUpgrader hit the nail right on the head - especially if you can find a suitable pre-hung door with hardware cutouts that fit your locksets, or with no cutouts inthe door so your existing lockset can be put into it, it will be cheaper for normal box store or solid doors to replace the entire unit at one time. This is especially true if pre-finished and you do not need to repaint the trim, or maybe paint only the exterior or interior molding faces ot match the rest of the house, because by the time you get new material, make a frame, prime and double coat paint it, your labor cost has far more than blown the $100-150 added materials cost for the pre-hung door versus making a new frame and buying paint for it. And like he said - fitting an existing door into a new frame can easily take an hour or two PLUS the time making and installing the new frame, versus the hour or so TOTAL to install a proper sized prehung door.
Of course, like he said - if you have a fancy or custom or very large door, then a new frame is probably your best bet - with the finish carpenter or installer pre-finishing the material before bringing to the site so can be fully installed in one day, including any touchup paint for installation nicks - FAR simpler and cheaper than painting after installation, with associated problems of not being able to close door until fully dried, having to come back several times for next paint coat, etc.
On the cost end - for prehung door typically $75-150 range for the door unit itself for many common interior doors (reusing existing locksets) - more like $200-300 unit cost figure for exterior. For new site-built frame for old door probably $100-150 for materials depending on how much trim has to be replaced versus reused (commonly only interior can be reused), and then about $50-75/hour labor cost,
For a prehung door typically in the $150-300 range for labor to put in a new door, can run to $250-500 labor range for from-scratch raw materials to build new frame and install reusing an old door only. More if very fancy new hardware is needed. Actual cost depends a lot on specific door configuration and how well door frame thickness matches wall thickness and brickmold trim configuration and such (where of course a store-bought prehung door is easier because you buy to desired thickness), and of course local labor costs of course. Contractor types include of course General Contractor, though pretty much overkill ofr this unless one-man outfit - and Carpenter - Woodworking (finish carpenter), and Door installer, and Handyman if you have a reliable, experienced one.