Dont upgrade anything if it does what you want it to do. If you think it doesn't perform well in certain areas then upgrade them.
Personally the first thing on my list would be tyres. They can totally transform a MTB. Also, couple that with tubeless. Beyond that would be brakes, fork, wheels then finishing kit.
Skies the limit with upgrades so you need to work out at what point you stop and if you should just chop it in for a higher spec bike.