You will not get (nor are you entitled to) a replacement vehicle when something fails under warranty.
Many new model cars (EV's and otherwise) have "teething problems". GM will replace defective components, but will not replace the entire car.
If the car continues to have problems and is in the shop repeatedly, you may be able to get it replaced under your States "Lemon Law".
In California, if the vehicle is out of service for repairs for a total of 30 days (not necessarily at one time), you may
be eligible for a replacement vehicle.
Or if they have made 4 or more attempts to repair a specific defect.
Or 2 or more attempts to repair a "life threatening" defect.
Google "lemon law in XX" (your State) for specific info.
If a manufacturer was required to replace every new car that had a component fail, the cost would be HUGE (Tesla would have been out of business a loooong time ago). Give them a chance to fix it. Sorry you got one with a bad battery