The digital nomad visa has not yet been set up in Spain. They've been saying it will be this year but things tend to move very slowly here.
I assume you are from UK? The only things we know about this new visa is that you must work for a company not registered in Spain and does less than a certain percentage (12%?) of business with Spanish companies and you either have to show a contract with a company that you've been doing this work for at least 12 months or, if you are going freelance, to provide a business plan to show your expected income.
You will have to show you earn a certain amount of money per year but the amount has not yet been published. The advantage is that you would be taxed at 15% instead of 25% for the first 4 years.
It will also be valid, initially, for 1 year but can be extended each two years up to 5 years then you can apply for permanent residency and the visa will be valid for close family members as well.
As said, the bill to allow this was agreed but is still waiting parliamentary approval so we don't actually know what it will entail.
However, if you're not from UK but another EU country then none of the above applies.