Posted: Fri May 13, 2022 9:11pm
As RichB says, you cannot work here now without first obtaining a work permit.
There are two ways to go about that; the first is to have a skill that is on the Spanish shortage occupations list, then find an employer in Spain prepared to offer you a contract and apply for the work permit on your behalf.
The second and possibly more likely way is to be self-employed - Autónomo - and start your own business; as Rich points out though, the very least the embassy will require in support of that is a solid business plan outlining your proposal and probably pre-sales invoices / letters of intent from customers in Spain.
You can come out on an NLV, then after a year, at renewal time, apply for a work permit; this may give you time to find a business you can do and poll potential customers.
Working from home for an overseas company is also not allowed on an NLV - NLV means NO remunerated employment of any kind whatsoever, in any way, shape or form.
Spain *are* investigating a Digital Nomad visa that *would* allow this type of work, and would again be a pathway to permanent residency, alas at the moment it remains very much in the “thinking about it” stage.