11-42T cassette of State All-Road to Shimano Deore XT 11-46T?
This State Bicycle All Road has the same specs you pointed out.  It appears as though it comes with State's own brand of derailleur with a long cage.  The single ring crank has 42 teeth, the same as the big, low gear sprocket of the cassette.  To determine if you can run a cassette with a larger low sprocket of 46 teeth as you propose, the rear derailleur must be spec'd for that capacity. Due to the odd, State branded rear derailleur, there isn't much information available about it's specs. Reviews of the bike, in discussing the shifting, are mixed to poor, and in cases where the reviewer has experience with SRAM or Shimano drivetrains, the State derailleur doesn't fare well in comparison.
You probably would be ok going up 4 teeth in your max low sprocket with a little adjustment of the B-screw to move the derailleur cage down a bit to accommodate the larger low sprocket.  Then again, it may have trouble where shifting is less smooth to the larger cog or it could even fail to get the chain onto it. With the dearth of specs for the State derailleur, I cannot say if the thing has a B-screw adjustment even.
The Shimano XT cassette, 11-46t is designed to be used with a 1x drivetrain--thats a single chainring up front, but usually it's a chainwheel with a tooth count in the 30's. The 11-46t version has a very large jump of 9 teeth from the second largest rear sprocket of 37 teeth to the top 46 tooth.  That's basically a bailout gear akin to the use of a granny ring on a bike with a front triple.  My point in all this, is to advise that if it is lower gearing you seek, it would likely be better and less expensive to change your front chainring to a smaller tooth count. For example the current 42t chainwheel combined with the proposed 46t low sprocket yields a gear ratio of 0.91.  Changing to a 38t chainring and keeping the 42t rear cog yields a ratio of 0.90. virtually the same low but you've preserved the tighter range of the 11-42t cassette so the jumps between gears is less making the ability to maintain a comfortable cadence more possible.  The draw back is you'll lose a little off the top end, where the current high ratio of 3.81 drops to 3.4.  (I'm strapped for time to figure the mph change of those differing ratios for a given cadence, but it will fairly minimal). Depending on how and where you ride, that may be of some significance.
Discussion of prices on SE is off topic due to the changing nature of them as well as their wide variation from place to place and through time.  I will offer that at this time, a single chainring will run you somewhere around 50-60% the cost of the XT cassette.  The chain will have to be resized as well. The smaller chainring idea means cutting a few links from your current chain. Adding a new, larger cassette will require adding a few links to the chain, which is problematic in a case where you've purchased the whole bike because it's not common for the seller to include the extra links, if any, yielded from the manufacture or assembly of the bike. It may be you'll have to purchase another chain with the larger cassette to get to an appropriate length. Minor point but possible source of extra cost.