I am a SCUBA diver. I am actually a fairly advanced SCUBA diver. I have a Rescue Diver certification currently and am at the point of deciding if I should start the steps to becoming a Dive Master and instructor. It is something that I love to do and have a unique look on things. Honestly what I would love to do is offer free training to people who normally wouldn't be able to afford it so those people can get out there and enjoy some time under water as well. But I digress because this post is about learning to dive and diving on a cruise ship.
So anyway if you want to learn to dive I congratulate you on your interest and hope that you get the chance to take it to the next level and actually learn. If you are still on the fence but are interested you can sometimes find what is called a "try dive" where a dive master will teach you some basics and take you around under water. I personally love being under water and I feel at peace there, I learned at a local shop that I wandered into a few months after my wife passed away in 2019. I broke down crying while filling out some paperwork because they had a checkbox for married or single, in my heart I was still married and would have been still if she was no longer with me. A few hours later I was at home reading over the lessons and watching some video's to start my learning process, that evening I was in the water going over the basics. It's a skill well worth learning and can allow you to experience so many things your surface dwelling friends will envy and some will even cringe over, lol. But this post is more about where you should learn to dive.
So there are good teachers and bad teachers, some have a knack for helping people get things to stick in their head and some just don't. I can't advise much on that but what I can say is do your research and give you some advice before you get started. With that said unless you have absolutely no time to learn outside of your vacation I would skip learning on a ship.
Now I am not saying that the dive master on your ship will be incompetent or anything like that. But you will likely feel a bit rushed and it will be much harder for you to learn good skills that will stick. For one your instructor may not have the best English language skills, many of the people working on cruise ships do not come from English as a first language countries. And while the skills taught worldwide are standardized asking questions is a big part of understanding. If you have a potential language barrier it will be tougher to figure things out and be safe. You will also be doing all your learning on your phone, tablet, or computer at home or on the ship if you have internet access. Royal Caribbean is a PADI (Professional Association of Dive Instructors) affiliate so you will be taking the PADI e-Learning course. IMHO there is nothing wrong with it and I used it for my Advanced Open Water and Rescue Diver certification courses but I already had a good understanding of diving when I completed my Open Water certification classes and those were done in a nice little classroom with a person who could answer questions and point out certain things to remember. IMHO it is well worth doing your classes at a reputable local dive shop because your instructor will go over things even if you are doing the e-Learning course online.
Another thing is you may not be able to learn on every ship. Many of the smaller ships have a "dive shop" but all they are able to do is offer you is to purchase your mask, fins, and snorkel along with some other accessories or a GoPro camera. Most of the larger ships however will have a PADI dive master onboard where you can take the course. But your onboard instructor will not be the person taking you on your actual dives, you will actually be doing a PADI Open Water Referral course and can actually be done at home in many instances. And that is one of the reasons why I don't personally recommend it as you will be paying more to learn on the ship and your instructor likely won't even be in the water with you when you actually do your certification dives and your instructor for the certification dives may also have a language barrier as well which just compounds potential problems. All of those things combined makes me cringe and increases the chances that you will not learn your skills properly and puts you in a situation where your very life could be in danger.
I also don't recommend going out and learning to dive in a foreign country because it's cheaper than doing so near your home. The language barrier comes into play there as well and it's not uncommon for someone to be certified only to end up near home taking an advanced course for the new instructor to learn that you don't properly know your dive skills. In fact when taking my Rescue Diver certification course this absolutely came up in the conversation with a few people and one of the owners/divemasters. Long story short someone came in who certified in the Philippines and thought they were good divers but once in the water it was apparent they had barely enough skill and knowledge to dive and they were not very safe about it.
You could do your training at a local shop and get a referral to someplace where you will be traveling on the ship the same as how your training would work while on the ship, however it takes 4 dives for your certification and most shops only do 2 and sometimes 3 dives per day so you will need to work that out ahead of time or plan to have referral dives in 2 different locations. This all adds up to spending even more cash to learn to dive.
So what do I recommend you might ask? Well do some research on a local dive shop. In the US you may think that you have to head to the oceanfront states to learn to dive but you would be wrong. If you have a city with a fairly large population you can easily find a dive shop to certify. I got mine in Oklahoma City, OK and there isn't any oceanfront property for about 10 hours of driving. There are shops out there and you can learn to dive though depending on where you live it may require a commute or plans to spend a couple weekends in a major city nearby.
So you found a shop and are taking the plunge. Great, but... You will generally need a couple pieces of gear and if you travel on a ship it's worth having them. Those pieces are a mask, fins, snorkel, and dive computer. Few people still dive with charts and without a dive computer you will have to do a lot more work to figure out your second dive time limits, just buy a dive computer and get going. It's not a huge cost overall compared to your regulator set or BCD and it will make your trip much more enjoyable plus it's cool to be able to show your friends and family how deep you were and track how much time you have under water (as of writing this I have been to 100 feet deep and have over 60 hours total time under water). Fins, Mask, and Snorkel are pretty basic low tech items and can be picked up just about anywhere. The thing you need to make sure of is that your fins are the proper size for diving. Short fins are for surface swimming or snorkeling and will not propel you through the water very well. Long fins are made for freediving and will wear the user out in a short period. Most free divers do not swim for long outside of when they make the dive and then have a long period of rest afterwards. The long fins will also be a pain to put on and take off on a boat. You can get a fin that is for barefoot diving but then you have to carry shoes and with my dive boots on I walk around on the ship and in port so it saves me a ton of extra stuff to carry. For a Mask and Snorkel even a cheapo will work in a pinch but SCUBA masks are generally made with a tempered glass lens and will have a soft silicone skirt so that it molds to your face better and prevents leaks. A snorkel is just a tube that sticks into the air and you can breathe through a basic but serviceable one can be made at a plumbing store so don't overthink that.
I personally love the Cressi Pro Light fins but I do replace the original straps with one of the rubber band ones that snug the fins as you dive and will require a dive boot to protect your feet. For a mask and snorkel I just use a cheapo from Amazon, it's honestly so low tech I don't think branding matters much unless you are looking for certain features like the ability to have corrective lenses made for your mask and many masks will be packaged with a snorkel as well which should work in most situations. For a dive computer I use a Mares Puck Pro currently but will eventually upgrade to something like the Garmin MK2i but will keep the Mares as a backup as well. There is an upgraded version of the Mares Puck Pro that adds bluetooth for transferring your dive logs to your phone or tablet but it is nearly twice the cost of the Puck Pro, I personally use a cable to transfer my dives with a USB OTG connector and have had zero issues.
The only other thing I can recommend is a dry bag. You don't have to have one to scuba dive but if you carry a cell phone, towel, and change of clothes with you it's well worth having one.
So that's it, I know it may not be what you wanted to hear but IMHO it is better to get your initial certification locally as the skills you learn in the water when you get started will be the skills you build on every time you dive. And if those skills are not very good you will not be a good diver.
Here are a few Amazon affiliate links to some basic gear that I either have or plan to get if my advice has been helpful please consider using the links to make a purchase.
Cressi Pro Light Fins
SCUBA Dive Boot
Mares Puck Pro
Garmin MK2i
Mask and Snorkel
Dry Bag