Unfortunately you can only work here up to 6 months as a digital nomad and it's not residency, it's basically just an extended tourist visa.
Portugal's digital nomad visa seems good but their immigration system is apparently extremely dysfunctional.
China will be opening new visa track for tech in October, must be interseting to see