The US doesn't require citizens to have ID to exist. That's part of "freedom" in America (I mean this genuinely).
So it is an additional step if you want to vote. Cynical state governments have tried to shape who can vote for them by making IDs mandatory and strategically closing ID offices in certain areas, reducing office hours (among other barriers). It's not a hypothetical situation.
Voter ID laws in the US are weaponized to reduce turnout. Make ID compulsory, then make getting ID really cumbersome (reduce office hours, increase wait times, increase costs).
The US doesn't require citizens to have an ID just to exist. That's part of the "freedom" Americans like to talk about. It sounds like every citizen in Spain already has a DNI so they should be able to vote without additional hassle.
It's the additional hassle to vote that opponents of voter ID laws cite as the crux of the issue. If you pair mandatory voter ID laws with strategic ID office closures (among other barriers), you can influence who can vote. This has already happened; it isn't hypothetical.
I have read many times that requiring an ID card to vote in the US is seen by many as undemocratic as certain demographics are hindered from voting. To me this is absurd. To create trust that elections are held without fraud, IDs are an essential building block.
Requiring an ID card without taking steps to ensure those IDs are available easily and for cheap. There are almost no "election security by voter ID" bills that provide the latter. On the other hand, making voter ID mandatory has been accompanied by closure of offices or reduction of hours, increasing wait times and so on. It's clearly a dirty trick.