Is it better to do a minimum of compression while creating a track (in terms of sound quality) ? Or is it just all about how the compression is used in the track?
I assume wanted to ask if it makes sense to use compression while writing a piece of music. You can use compression on your individual tracks (channel-strips) when the signal is too dynamic compared to the rest of the tracks, if you want to emphasize the attack phase of drums, bring vocals closer and so on. But I strongly recommend not to use a compressor on your master bus or on any summing busses while you're still in the process of recording / editing the piece. Changes in volume, individual compression and other treatment on you channel-strips become unpredictable if you "mix into a compressor". You can start doing that when you're done with the piece.
In case you asked about using compression in the signal chain to your recording gear, the answers by @Christan-van-caine and @Tetsujin say it all.
The point of compression is to remove dynamic range, or the perceived volume difference between the 'loud' parts and the 'quiet' parts. It squashes the loud parts down to be the same volume as the quiet parts, then you boost the entire thing back to normal volume.
Now, based on that description, should you use compression? Are some parts of a track quieter than others, when they should really all have the same impact and volume?
Compressors are used for other things too, tricky stuff like ducking (where you compress one signal based on a trigger from a different signal, aka link two compressors together) or bus compression, where you compress an entire bus mixed together to maintain a constant volume, such as a group of vocalists or a group of drums.
Edit: Another example of linked usage is linking two gates together. Set the first gate on the Kick drum. When you link them, the second gate will be open whenever the first gate is open, aka the Kick being hit will mute and unmute the second gate. Now feed a 50-100hz sine wave generator through channel 2 and voila you have an awesome extra hard thump attached to the kick channel. Same with snare and some pink noise.
I would always get the raw data down to track as cleanly & simply as possible; that allows you the most flexibility afterwards.
Caveats would be:
if it's, for instance, a pop vocal you know will only get further compressed later, then a gentle curve on the way in wouldn't hurt at all.
If you are trying to capture a moth's wings from 30 feet, you wouldn't touch a compressor at input.
A good rule of thumb is to never ever use compressor or any form of processing at all on input, but to safe with a limiter for unforeseen things and record low enough for no peaks to theoretically reach the floor. Everything you capture will be unchangeable after recording, meaning mistakes and changes of mind will not be possible anymore, whereas if you record everything raw you can calmly edit it the way you want later, and still being able to undo it by saving the original files.
There are though times when processing is called for - say for example when you have an insane rumble of wind for example and the windscreens doesn't cut it, but the rule still applies in using as little as possible, and only go with this when there are absolutely no other ways. Also - if you really need compressor on the input, you probably need to find a better way of aiming the microphone. Most problems regarding dynamics and frequency response during recording tends to be about the microphone not being in an ideal position.