That’s a very good question because there are two contradictory schools of thought, and you are likely to encounter both of them before you ever send a dit.
You will often hear older hams say that you should master the straight key before “graduating” to the electronic keyer and paddle– that’s what they did in the 1890’s.
Younger hams will tell you that you are going to end up using the electronic keyer 99.9% of the time so you might as well start out with it.
My own advice is to learn both at the same time. OK, not literally the same time, but spending short periods with each on an alternating basis. I have two reasons for this advice.
First, sending with the electronic keyer will help you to send with the straight key, because it will allow you to hear yourself making perfect dots and dashes. If you start out with just a straight key, you don’t have that “model” to work with and it is difficult to get the timing
Secondly, if you get to a level of competence with either of them, and then try to learn the other, you will have a “speed differential” problem. For example, if you are sending at 20wpm with a straight key and try to learn the paddle, you will find it very difficult to send at the 10wpm or so that is appropriate for a beginner.
Well, I guess there are three reasons– the younger guys are right when they say that you will end up using the paddle and keyer most of the time. You can’t send more than about 20WPM comfortably with a straight key, but if you keep at it you will find yourself operating much faster than that on a regular basis. The speed progression in sending code will certainly be easier if you start with a paddle or adapt to it before you are forced into it by the limitations of the straight key. But I really believe that any ham should be able to grab a straight key and go to work with it at a moment’s notice. It’s part of the legend.