Replacing the Acera rear derailleur with the RD-M591 is possible. Despite being marketed as a "9-speed" rear derailleur (the 9 referring to the number gears/sprockets/cogs--all mean the same thing--that make up your rear cassette), the M591 will work. It is of a higher class/quality of components that Shimano named "Deore." So this Deore derailleur will work with your 3x8 drivetrain because all Shimano 7, 8 & 9 speed rear derailleurs share the same "actuation ratio," meaning these rear derailleurs move the same amount per mm of cable pulled by the shifter. Thus, your 8 speed shifter will pull an amount of cable to make an 8 speed spaced shift and the Deore will move the correct amount--the same amount the Acera or even a 7-speed, Tourney-class, rear derailleur would.
Conventional wisdom states that upgrading components on a new bike (& even more so, on a used bike) is more expensive than paying a little more for a bike that comes equipped with a higher class of components already. Especially if labor (your own or a bike shop's) to replace components is considered. In addition, the trend in mountain biking is going to a 1x drivetrain (expressed, "one-by") where there is a single chainring in the front and 10, 11 or 12 rear sprockets in the back. This eliminates the weight and maintenence of a front derailleur and shifter, and two chain rings. As your biking develops and you learn how u like to ride, open it up to different things.
Your derailleur upgrade is reasonable. It will work. One other thought is that you'll require the SGS caged (the longest option) M591. While it's still the rear derailleur we're discussing, the reason for needing a long cage (the lower part of a rear derailleur that houses the two small pulley wheels) is related to having a triple chainwheel up front. There's more chain to take up and keep tight between the large ring and the small ring and rear derailleur's cage must be able to handle that range.