I'd be shocked if the hardware cost of all of SpaceX's failures (from their start to now) totals much over a billion, nevermind how little of that is Government money. To do with Starship, NASA is paying for HLS (pictured). Unless that blows up during Artemis 3, NASA hasn't lost a dime on Starship.