Either there's a moral right to earn money through whatever skills one can offer, no matter how productive. Or there's a moral right to free money.
Anything else, in the long term, amounts to murder through abandonment. It's no different than leaving a wounded person in a forest while the group marches ahead, even though the group has plenty of food and a stretcher and a car, and fit, healthy people to lift the stretcher into the car.
I don't agree with your dichotomy.
I think you have a moral right to offer to provide goods or services for people. They aren't obliged to want them though. I think it's on each person to find out how they can provide something people want.
Just because I enjoy coding or am good at coding, if nobody wants to pay coders then it's on me to find out what I can provide that they do want.