There are three main tiers of difficulty when it comes to this sort of thing.
The easiest by far is swapping out one window/door for another of the exact same size. Nothing has to be opened, walls don't have to be reframed, drywall doesn't have to be cut, it's pretty simple. You just pull the screws, cut the expanding foam, and push the old one out. Reverse the process and the new one is in. That said I have spent entire days fighting with "easy" replacements but that's not the norm. Even the old trims should go back on without any cutting or modifications.
The middle difficulty is making a window/door smaller. In this case you have to get the old one out and then build the hole in with wood. This may necessitate larger trims on the inside to hide the edges, and it may require changes to the siding on the outside as well, depending on how small you're going. But really this is neither here nor there, because you're not going either of these routes. You're looking at option three.
Option three, no matter at which end of its own independent difficulty scale it lands on, will always be an ass pain. The existing framing will have to go, walls and siding have to disappear, and large headers will have to be replaced with larger ones. It is important to note that if the wall you are working on runs perpendicular to your floor joists, that is to say if your floor joists terminate on top of that door header, then simply removing it without proper forethought and preparation could result in collapse.
This is not to dissuade you. This is to prepare you. Any skill can be learned. But walking in unprepared is a fantastic way to set your hair on fire.
First things first, you have to know which way your floor joists run. If they run parallel to the wall then it's fine, the rest of the wall will support the space while you work. If they run perpendicular to the wall, terminating on top, then before anything else you must build a temporary support wall with 2x4 lumber to support that area before you move on. Once the header goes it will be the only thing (not including the double top plate) supporting your floor. A cursory googling should give you an idea of what I'm talking about.
Next you get the existing door out. That's easy enough. Pick which side of the existing frame you want to keep and measure over from there. Remember to make your opening 3/4"-1" bigger than the actual door to leave room for leveling and expanding foam insulation. You're going to have to cut back drywall (or whatever your basement is finished with) to make this happen so you might as well do it now.
The stud and cripple that made up that side of the door both have to go. Depending how you remove them, providing the new door is the same height, you should be able to reuse them. Watch out though, they are holding up what is likely a double 2x10 header, which in turn holds up the weight of the house above it. Sadly that header is now too small. Pitch it. You're going to have to build another one. Just watch it doesn't fall on your head.
Make sure that the side you chose to keep is level. If it isn't make it so. Remember that your header will be larger than the opening because it sits on top of the cripples. Depending on how far back you cut the drywall, and how much room you have to work, I suggest that you get just the new stud in place, slide the new header into the existing cripple/stud pocket on the side you left in, and then slide the new cripple underneath it. Typically installing both cripple/stud assemblies and then trying to fight the header into the pocket is a recipe for frustration.
You can now cut back the exterior by whatever method necessary and put your door in the hole. Ensure you flash that hole by whatever methods are applicable in your area. Level it, plumb it, secure it, and foam it in place. There you go, the door is in. You should be able to take down that support wall now. Now comes the tedious process of patching back in your drywall around the hole you had to make.
Note of course that this information is provided for illustrative purposes only, and is not intended to replace the advice of an engineer or certified general contractor on site. Your personal situation may differ greatly from the situation I have described. It is possible that the floor over the door is supported by a steel lintel, for example. There are many potential and confounding variables that would fall well outside the scope of this general information.