Month of year? Number of people? Mobility challenges? Luggage quantity? Budget travelers?
Some people favor a special bus from the airport to Sorrento, but I've never used it. I would make sure there are several departures after your scheduled arrival time, just in case. Our bargain flight from the U.K. was scheduled (I mean, not "late") so that we had to spend the night in Naples. Not a problem, had a nice walk and pizza lunch the next day.
Bargain hunters use the Circumvesuviana, comparable to an aging commuter train, not operated by the long-distance railroad company. It is exceptionally crowded, only has bus-sized luggage racks, and is found by some (perhaps non-city dwellers) to be scary, with musicians cadging tips and so on. The real problem is finding a place to put a large suitcase where you can supervise it but not block the aisle or the doors. It's a struggle. Most cars are not air conditioned, and it's sweltering from May to September. It is really, really cheap.
You get there in Naples by taking the escalator down from the main rail station concourse. To the left (long walk) are the pay toilets, to the right (long walk) is the Circumvesuviana. Regular ticket windows in Naples, in Sorrento you go to the news stand to buy tickets, no staff in the station. Validate that news stand ticket in the machine before you board. This is really, really inexpensive! This is also how you get to Pompeii and Herculaneum. It's much easier without luggage, as a daytrip. But the bag checks at those two sites are very reliable for time-pressed travelers.
These are easy walks, on modern marble tiles. Don't rely on old travelogues written by post-war travelers. The Naples rail station is superior to most rail stations in the US. Maybe ten years old?
When we were (opinion) overcharged 15 Euros for a short cab ride from the Circumvesuviana to our Sorrento hotel, we made a cheerful decision to have our hotel book a black-car back to the Naples rail station, where we had come from after our night in Naples. It's over 100 Euros now, but we paid 90 back then. Money well spent. Charged to our final hotel bill. Note that most taxi rides in Naples (including to Sorrento, if you were to do that) are flat rates. Download the flat rate sheet so you can show the driver that you know the score.
There used to be few Circumvesuviana departures a day with special fares and special rolling stock, called the Campania Express or something like that. Don't know if it survived the Pandemic.
I imagine there are SITA busses, but I've never read about them here, Naples-Sorrento, I mean. Those might be similar fare as the Circumvesuiana. Maybe a change, because it's over an hour trip.
https://community.ricksteves.com/travel-forum/italy/getting-around-amalfi-coast