In Spain, the national ID (DNI) costs 12 euros. They wave the cost under certain conditions.
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.