I have traveled by cargo ship from Europe to Asia via Suez Canal. It is not cheap, but it is one of the best things i ever did. I think it worked out to about $100 a day, including the mandatory insurance. Aside from passage, you get a large state room and all meals provided (although it's very "working man" meat and potatoes type food). It was totally worth it for me. You will be out of mobile signal for the vast majority of time you are on the water, completely cut off from the outside world. Some of the most memorable things for me... Sitting docked in the sea just between Malaysia and Singapore for almost an entire day, just floating around amongst hundreds of other massive cargo ships in the heavy mist. Going through the Suez Canal, with nothing but desert on either side, in a whole conga line of crazy ass massive ships. Massive fucking epic thunderstorms and rainstorms in the middle of nowhere, no land around, sunsets like you never seen. It was awesome.
I don't think there are many, if any, work-for-passage cargo ships any more. It is union labor, you need to be certified, and many of the international shipping companies hire their entire crew out of Philippines or China anyway. It's possible you might be able to find work-for-passage on domestic routes in places like Indonesia or Philippines, but even then i'm not sure it'd be easy as a foreigner who can't speak the language and who doesn't have any background in the industry.
What is still an option for Americans at least is working fishing vessels, but by all accounts that is very hard work and it doesn't take you from A to B - you just go out there to earn money and that's that.
Also, you might find that right now that getting passage on a cargo ship is difficult due to COVID travel restrictions still in place around the world, especially in Asia. Even when i went several years ago i had to get a whole bevy of vaccinations including yellow fever just to be allowed to transit through certain ports - not even getting off the boat. Then there's weird shit like in Saudi Arabia they confiscate all your booze and porn, but give it back once you get into international waters again. You'll be dealing with a lot of awkward local laws. You absolutely 100% must have a passport and all necessary visas and vaccinations, even if you do not leave the boat, and expect the captain or first mate to take your paperwork the moment you get aboard. You won't get it back till you leave.
With regard to getting passage on a sailboat, that is much easier to do. There are whole websites dedicated to it. Crewbay is the one to look at if you don't want to pay anything, since it's free to create a profile and browse. I attempted to find a ride while i was traveling in Florida and then Panama last year and... i was really disappointed. Almost every captain who got in touch with me was a man who gave off the impression that they were using their boat and that website as a way to score chicks. You can't even sign up without giving your gender, and there is no option for non-binary or not specified. It might be different if you are listed as "M", but listed as "F" it just seems to attract a whole parade of sleaze bags. I guess there are plenty of women who are totally fine with joining a man on board, even if they don't actually put out, they might just allow themselves to wear a bikini and be eye candy for the dude, fuck i dunno. To me the whole process just skeeved me out and i wanted nothing to do with it after spending a couple months sending messages and trying video calls to find a good fit. Your mileage may vary.