If you're still shooting JPG stop everything you're doing, grab your camera, and switch to shooting RAW. Now. I'll wait. Seriously, go do it.
There's so much extra color and detail contained in a RAW file that you're throwing away if you go straight to JPG, it'll blow your mind the first time you see it.
If you can stand a little math, read the rest of this paragraph. If not, just accept the fact that the amount of detail contained in a RAW file is way more than a JPG. Still reading? Great. A JPG has 8 bits of information per color channel. That's 256 different shades of red, green, and blue, meaning JPG can show 16,777,216 possible colors (28=256, 256*3=16.7M). Using the Nikon D800 as an example (since that's my current camera), my RAW files have 14 bits of information per color channel. That's 16,384 shades of red, green, and blue, meaning my RAW files can show 4,398,046,511,104 possible colors (214=16.3k, 16.3k*3=4.4T), which is over 260,000 times more possible colors than JPG (4.4T/16.7M=260k). Not 260,000 more colors, 260,000 times more colors.
Though I'm sure you're now completely convinced that shooting RAW is the only way to go, to be completely fair, I do have to mention that there is a downside, and it can be a considerable one depending on how prolific of a shutterbug you are. Because they store so much more information than a JPG, even when compressed RAW files are considerably larger than JPGs. So, storage space can become an issue. I have a 32GB card and a 128GB card in my camera at the moment. I have, more than once, filled the 32GB card, but have yet to fill both on a single shoot. There have been days when I came home with over 100GBs of RAWs (usually a long time lapse). Let's say I did that ten days in a row. Storing all of those RAW files, I would have filled a 1TB hard drive. You can see how storage space can quickly become a concern.
But let's be honest here. You knew photography was an expensive hobby when you jumped in (if you didn't, I'm telling you it is, so now you know), and final image quality trumps everything else, so go buy more hard drives (or sign up for more cloud storage space, a topic I'll be covering later). Seriously, if you haven't switched your camera into RAW mode, go do it now!
Still haven't switched yet? Ok, maybe a visual example will convince you.
What you're looking at is a Straight Out Of the Camera (SOOC) render of a 30-second long exposure I took one fine evening in Big Sur. I almost deleted the image on the spot because it was so dark. I figured there was no way I was going to get a usable image out of it. But, something told me to keep it and play with it later. After a fair amount of work in Lightroom, I was able to produce this:
Not too bad (if I do say so myself), especially considering what it looked like to start with.
While (extremely) impressive, this alone might not completely get the point across. So, I went back and exported the original to JPG, then applied the same edits that I made to the RAW file to the JPG I had just exported. This was the result:
JPGs simply lack the depth of detail to perform seriously heavy editing. That's not some biased opinion. It's fact. And the real fact of the matter is, if you don't shoot RAW, your images will ALWAYS be inferior to what they could have been had you shot RAW.