I've encountered a lot of weird bugs, including it occasionally becoming completely unresponsive, that I've not had on this particular machine before. This machine being a 16 inch M1 Max.
I don't think it's a coincidence you're having poor battery life with an electron app.
Wifi can be a very mixed bag, the usb-c charging issue sounds like something worth taking/sending it back for (assuming it's not something obvious like a crappy usb charging brick).
Warranties exist for a reason, if you choose not to make use of it, that's on you, not the manufacturer.
Also: the 5 hours in vscode thing is almost certainly some extension you're running that is constantly spinning its wheels. This isn't hard to figure out - just look in Activity Monitor.
I’m legitimately unsure what changed in Apple to make their support go from “pretty damn good” to “honestly a waste of damn time”.