Yes definitely shoot RAW if you camera can do it. JPGs are compressed to basically what you see, JPG compression gets rid of a lot of stuff that are there in the data file, but do not show. Also it for example stamps white balance on the pic and trying to adjust it from JPG doesent give nearly as good results as changing it from RAW. Also JPG adds noise reduction and often artificial sharpening and clarity etc and adjusts the colors also a bit. You can for example lower exposure from over exposed pic and still get a lot of data from what looks like complete white(or black) in JPG.
If you do these things like noise removal and sharpening manually in photoshop, then you can get a lot better results than what phone does automatically and try to then add noise removal and sharpening on top of that.
How i like to sharpen things is that i first add just a little bit of clarity and i usually zoom in a bit to make sure that it doesent ruin details. Then usually i add some sharpness, but again i zoom in to make sure that no details are lost. I use affinity photo nowadays and it has this similar setting page for all photos that you have for raw only in photoshop(or used to have at least, havent used PS in years). Anyways it allows me to apply the adjustments of clarity, sharpness and noise removal all at once and i dont need to first apply one, then another and then another, so i use it a bit differently from how i used photoshop.
Anyways the trick for good sharpening is that you first only add enough clarity and sharpness to bring out the details, but not make them lose too much detail even if you zoom in. I mean what sharpening and clarity does when applied too much is that remove like really close details, as it sorta blows out those details so that they can be seen clearer when you zoom out. You dont want to lose too much of these small details at first and you need to balance the level of noise removal(which will eat away details also) with this sort of pre-sharpening stage.
Then when you have added small amount of sharpening and balanced it with noise removal. Then you resize the pic to its final size and only then apply the real sharpening and then if you have done your stuff correctly, you dont need to use too much of it and also since you have removed the noise already, that sharpening does not bring as much noise with it anymore. However if you just want to post the full size image, then you add the final sharpening without resizing and just zoom in 100% to see that you dont destroy details too much. Different websites often use different algorythms for resizing, some worse than others and it is highly likely that you can get better results if you resize it yourself and sharpen, instead of letting some automatic algorythm to resize and apply some automatic sharpness to it. But many websites also allow you to view the full image without resizing and because people today have so fast internet, you might just as well post full size images to most places. Some places like facebook you will want to resize yourself if you dont want to pics to go bad.
As i warned a bit on the original post, mastering photography will take practise and there are tons of tricks that those professional looking pics have, but that are not apparent at all for someone who has not studied photography in depth. You might wonder why you cant take photo that looks like a pro shot and not realise that the pro looking pic might use for example 3 sources of exactly directed lights that are all adjusted to be exactly correct brightness to each others, at the right distances of the objects. They might also use some colored filters in front of flash or bright multicolor leds as a support light that you dont notice.
But the thing is that its all about light, not expensive studio light setups. You can even use sunlight and some reflectors and get very good pro looking results. But that is not a viable option for everything or everywhere or at every time of the day. You cant suddenly make just sunlight for example to come from 3 different directions in sharp way and not have it leak to the background at all to keep it completely black. I guess that also could be done with some mirrors and lots of tweaking, but im sure you understand that it might not be enough to be all light to rely on. Unless you have some very specific type of lighted photos you want to take and can make that setup at a window, then it might work as the only light setup.
Having enough light will improve even phone pics tons. As you might have noticed from many phone pics with good phones, if you take a pic at daylight where there is plenty of light around, the quality is not that different from a good DSLR camera. But take that photo even a bit darker place and phone camera will look blurry and noisy(or have so much noise removal that its even more blurry). Also the noise on small sensors like you have on phone is a lot uglier than on larger sensors where each pixel is waaaay larger than on phone.
I think 500 bucks would allow you to get a pretty decent macro setup. For example canon 100mm 2.8 macro lens used, well i found a shop that had sold one for 350 dollars, so you should be able to score a one a bit under that if you buy used from a person, not a shop.
You can find pics with that lens from this flickr group:
https://www.flickr.com/groups/canon100mm/pool/
Flick groups are very good resource to see capabilities of lenses if you want to know what sort of quality you can expect form some particular lens.
Canon 40D i think is still very capable camera and i think best bang for the buck for macro camera from canon line. Nikon also made equally good camera to canon 40d and im sure its around the same price. I see cheapest canon 40d in ebay for 80 bucks, but most are around 130-150 bucks body only.
This would leave you not too much budget on flashes, but luckily flashes are cheap and you can also diy light source from leds. Trigger cables for flashes doesent cost much and you can get some old flashes for like 15-20 bucks each. Diffusers you can make from cardboard box and greaseproof/baking paper and put a flash inside it to get soft light. Light part is where you can really save tons.
You could also opt in for cheaper macro lens and go with the older manual focus route, but your budget seems to allow this(or maybe nikon also has equally good around 100mm macro for similar price?), so id say its better to go with that. It will give you a better image quality and especially with the thumb stick on 40d being able to choose focus points, the autofocus can help tons in some situations. However often when you shoot macro, manual focusing on a tripod is better. But in reality if you need to squeeze yourself to your tent and try to take some pic from some buds in difficult spot and you might have them scrogged, well this autofocus can make things tons easier. Also its a very good quality lens overall. Also suitable extremely well to portraits for example and what ever you might want to take pics of from little further away. 100mm is like a small telephoto lens, not extreme "zoomed" in, but some, perfect amount for macro, close up shots of objects like buds and portraits etc.
Im kinda temped to get a setup like this myself also, but i got so many other things where my money wants to also go and not too much of it coming in.. It might soon come that i can no longer use the DSLR at my work, so i might need to get one for myself again. Ill definitely go with the 40d again(i used to own one back in the days before upgrading to more pro camera) or some nikon from same era. Or actually i just googled how much 50D is and there seem to be deals that are not much more than 40D and 50D is the same but improved a bit, with better screen for example, more megapizels, but not much real difference in quality, but also more likely to be less used.
Im just throwing this 40d out there as it seems to be one of those that are incredibly value, there might be some slightly better, but none are like WAAAAAY WAAAAY better than the 40d, but for example 50d has better lcd screen. Also 40d doesent allow you to autofocus when looking through live view(lcd screen), if i remember right 50d allowed that, but do google. I read about these when 50d was new and its been a while..
Ps. Heres a link to flick group for canon 40d
https://www.flickr.com/groups/462800@N23/ . 50d also has its own and pretty much all camera models do. You can clearly see how some pics look dull and like basic phone pics, even tho its same camera and equally good lens than some of those pics that are extremely high quality. That goes to show what skill and good lights does in this photography thing
I also see tons of pics that are processed in a way that they dont lookgood at all, basically ruined by poor post processing, and some look really good. Also that cat pic i posted was with my old 40D to show just how good the sharpness and details can get with enough light.