Elon Musk’s Tesla has raised prices for its electric cars as it faces higher costs.