Correct. If there were no tariffs, you could buy a chinese EV for cheap. In this case for so cheap that the domestic US/Non-Chinese market cannot compete.
So in order to protect these markets, the product needs to be made artificially more expensive with tariffs. This way, the domestic markets have a chance of competing.
However, this also isolates the country and provokes retaliation from the other side. This usually results in both sides sabotaging their trade relations with each other (for ex. with tariffs) which is called a trade war.
I would be surprised if China cares too much, there is the rest of the world that needs small cheap EVs and solar panels. But they must do something as response, that's diplomacy.
I also don't see the problem to put tariffs to protect domestic products, sometimes it is necessar, but prohibiting completely is not cool.
Tariffs raise the price of affected goods allowing local suppliers to grow their business and fill the gap. A lot of countries looking to industrialize will institute tariffs to protect their industry so it can grow enough to compete with foreign companies. In our case it's putting the cart before the horse; our domestic industries are currently unable to supply domestic needs (remember the "logistics" issue at the beginning of COVID?) and several of these goods require specialist knowledge to produce, so it's not like we can just open a couple factories. Which is the other thing- companies might not invest in new factories as these tariffs could go away tomorrow and it takes time for factories to be built and then to even start producing goods. If the tariffs goes away before anything new is ready they will just shut down.
We have a number of subsidies for domestic EV production. That will all be a waste if China's subsidized EVs undercut the domestic market. This is consistent with a broader effort to boost domestic manufacturing. While at odds with efforts to promote the adoption of green technologies, the administration is trying to strike a balance between competing interests, in this instance balancing consumer access to green tech with job growth, domestic manufacturing, and less reliance on China for critical technologies.