I'm not justifying any law here. Saying a law is bad because it is passed in nationalistic fervor is a weak argument. It is a government's right and responsibility to make laws of their land and whether a law is passed because the current government is nationalist or not is speculative and irrelevant.
A good law can be passed with ill intentions and a bad law can be passed with good intentions. We should judge a law based on its merits and consequences but not based on who or why it was introduced.
In this case, we can discuss on outcomes of this law and how it is bad for the internet but speculating on the intentions is just a lazy argument.
Lately, the go to terms against any law impacting big tech have been 'nationalism', 'authoritarianism' and 'crash-grab' etc. Many times the laws on anti-trust or data-residency laws enacted by other countries have been termed as 'threat to democracy', authoritarian and as impacting basic structure of the internet etc.
Any country trying to regulate, promote its own tech or maintain sovereignty over its citizen's data is strong armed into abandoning them by utilizing various trade organizations, lobbying and diplomatic pressure. At the same time, there is lot of official and unofficial complaining and investigation about TikTok storing data of 'American citizens' in China.
To me this looks entirely hypocritical and any discussion that accuses 'nationalism' comes off as a bad faith argument.