Upgrading crankset to 48 tooth
What you need to do is look up the total capacity specifications of both your front and rear derailleurs.

For a front derailleur the total capacity is just the largest difference between the largest and smallest chainring tooth counts the derailleur can handle.

The total capacity is for a rear derailleur is the largest (difference between the largest and smallest chainring tooth counts) + (difference between the largest and smallest rear sprocket tooth counts) the derailleur can handle.

If the crankset with larger rings exceeds the front or rear derailleur capacities, it will not work, however, Shimano's specs are quite conservative, so you may get away with a couple of teeth over the specified max numbers.

You can look up Shimano derailleur specifications here: https://productinfo.shimano.com/#/

Another concern is chainstay clearance. Larger rings may hit the chainstays, especially as you are thinking of rings that are on the large side for a mountain bike.