You need a proper multitrack recording program - a DAW; Tracktion is pretty much the best you can get and totally free for a version from a couple of years ago:
You then need a USB Audio MIDI Interface.
That allows you to connect microphones, guitars, other instruments or MIDI keyboards etc. to a computer and record them in high quality with no latency (delay).
Something like a Focusrite Scarlett 2i4 is a good starting point.
In combination with the DAW, you can record one or more tracks at a time, while playing back any already recorded tracks so you stay in step with those; in effect the interface and DAW together give you the facilities of a recording studio multi-track system.
For directly wired instruments you can use some amplified speakers (like good quality PC speakers) for playback and monitoring.
For acoustic recording, you need some decent headphones with low sound leakage. They must be wired or non-digital wireless so they do not delay the sound you hear.
(I'd highly recommend the Sony MDR-7506 - they are one of the best studio monitor headphones you can buy and you can find them quite cheap if you search around.)
And you need a microphone, or possibly more than one...
That's the hardest choice.
A "Studio condenser" type gives the best possible sound quality, but they are very sensitive and if the area you are recording in is not totally quiet, you will pick up the background noises as well.
(Noise _cannot_ be removed after recording).
Add to that the fact that most of the so-called Studio condenser mics pushed at beginners are scams; a big casing with a cheap electret mic capsule in it, and thing get more complex...
The cheapest true condenser mics I know of are some of the MXL range.
The MXL V67g is a fairly low-cost large diaphragm one, about 100-
The MXL V87 is similar but lower noise and higher quality still, about 200- but on a par with some costing thousands..
Or, you can get an MXL 990/991 kit for about 100-, two smaller diaphragm condenser mics of different styles.
For a "cheap and cheerful" fake condenser, an NW-700 / BM-800 - they are examples of the electret ones sold as condenser, but you can get those for 10- to 15- so not a rip-off like the big name fakes that sell for 200 +
They are a bit variable but general work OK with a decent interface, considering the price.
(You do not need a "phantom power unit", that's built in to the interface - and the XLR to jack lead that comes with those should be thrown away, they do not work properly if at all. The mic itself is OK when used with a proper XLR to XLR cable).
If your recording environment is not quiet, you need a stage mic; they are much less sensitive and need to be just about touching your mouth or guitar etc. to get the highest possible level of wanted audio.
The standard for those is a Shure SM-58, the one with the mesh ball end you see in many live shows.
They are only 100- or less new.