How do I prepare to record a song and what do I need to do so? How do I choose a song? Why do I get nervous when I record?
I struggled with this as well. A few tips to build on the other answers:
Do it early and often. Assuming there are no other constraints and you are at home or somewhere you can control this, flip on the recording even during your warm ups. Until you get over your apprehension, record everything and anything, and if you thought a particular segment went well, listen back at it. If something is hard to do, the only thing that's going to make it easier is to do it over and over again.
For chosing a song, pick something simple, if you're singing, ensure it's in your range or adjust the key so it is. Start small and build from there.
As for the technology or cost, home recording setups can be as cheap as an instrument with an output, a computer, a USB recording interface, and a DAW (there are free ones like audacity). For a USB interface, I picked up a Scarlett 2i2, which I didn't feel was overly expensive for a total amateur hobbyist, but it depends on your budget.
Hearing yourself the first time is hard. I remember buying a condenser mic for the first time to start singing, having never sung before, and immediately regretting it. But over time, this gets easier. Remember that most people do not sound "full" un-mic'd, without being over an instrument or with other voices, or without a little reverb. Add some effects to your voice in your DAW - especially a bit of reverb to make things sound better. Also, if certain words or lines sound strange, work on why, fix, record, inspect, repeat.
It's called 'red light fever'.
The only way to get over it is… to get over it.
Harsh but true.
Normally, it only occurs once the record light is on; if it's happening before you even decide what to record, then it is in danger of becoming existential uncertainty.
The process is in your hands, for good or ill.
Decide. Record. Analyse.
If you don't like it, have another go.
Rinse, repeat - until you feel the world needs to hear it.
The difference between a successful & unsuccessful recording artist is not only in ability, it is in confidence in that ability.
I can totally relate to your anxiety. I remember my first session in the studio to record one of my original songs. I was very nervous.
The first time was exponentially more nerve racking than any subsequent sessions. So think of your first session as more of an exercise in overcoming your fear of the unknown. Hopefully you will have a sympathetic engineer/producer who will work with you to help you feel more comfortable.
Don't put too much pressure on yourself for your first session. Go into it with the attitude that the first session will be more about getting comfortable with the process than with getting a perfect cut. If you get some tracks down on at least one song - even better. But consider that icing on the cake. So no need to be overly ambitious on your first session. Keep it fairly short.
If you will be playing any instruments (recording a guitar or piano track for example), you should start practicing playing to a click track or drum beat. You can find some on the internet for free that you can play to. Toy keyboards often have drum tracks built in that you can use as well. If you will be just singing, practice ahead of time singing to the music that will be used in the recording.
As further preparation - practice singing with a microphone to get used to hearing your voice through a mic. In the studio you will use headphones. If you don't have the equipment, there are several possible options. You can buy an inexpensive (maybe used) karaoke machine. You can use a headset or desktop mic and headphones with your computer. You can plug headphones into any digital or tape recorder using the headphone jack, and press record and listen to yourself through the headphones by singing into the recorder's built in mic. If nothing else, sing with your fingers in your ears.
The day before singing in the studio, avoid alcohol and caffeine or other drugs that have a diuretic or drying out effect. Try to get as much sleep the night before as you can. Try to skip coffee (or anything with caffeine) the morning of your session.
Hydrate well before and during your session. It may also be a good idea to take a lubricant with you to lubricate your throat. I use raw honey and pineapple juice as they leave a slick coating on my throat. Be sure to do appropriate warm up vocal exercises before recording.
Try not to be intimidated by the red light. Red light fever is common and normal and natural. That's why they have a name for it. But with the post production capability of today's digital audio workstation software, you don't have to worry as much about singing it perfect all in one take as you would have in the old days when they recorded you on magnetic tape.
With computer software, the engineer will be able to cut and splice and pitch correct and time correct and assemble and modify pieces of multiple takes - into a finished track you will be proud of.
I usually end up cutting five or six takes on the vocals for one song. Then the engineer/producer plays them all side by side simultaneously and turns the volume up and down for each one and then uses the best parts from all ten takes to splice into one "perfect" cut. He/she can mix and match at will. So I can mess up on every take, but as long as I don't mess up the exact same part in each, it can be fixed in post production.
In post production, the recording engineer or producer can also do pitch correcting (for those one or two notes you are a tad sharp or flat on) and add reverb (or other effects) and equalization. They will even out the volume (using compression) so if you sing a little too loud here or a little to soft there - no worries.
Bottom line - a good producer/recording engineer can make your performance sound stellar, no matter how bad you mess it up. So don't worry too much about being perfect. Especially the first time in the studio. Just relax and have fun. And remember that the second time will be ten times easier.