I worked online for several years as a software/web developer but now I had like 6 years no jobs at all. I tried all freelance sites and could not get any job although I have recommendations and very good online portfolio . No jobs in my country and I tried to apply to jobs in other countries but they always reject my application I think because of visa difficulties .
Have you been writing code and building things in the last six years? If your resume/portfolio doesn’t show anything since 2017, that is probably hurting you.