There is no ferry in Atrani, you will take ferry to Amalfi then walk or cab to Atrani
Your other options from Sorrento are SITA bus or private driver
We used this company while in the area
Was 100 euros for Sorrento to Amalfi in 2019
https://www.topexcursionsorrento.com/?portal_referer_id=46
Ferries are reliable but can’t run when weather is bad/ sea is rough.
Sorrento to Amalfi is a major route, both have large docks so those won’t be affected as easily as Positano dockings for example.
Bus and ferry info here ( and more)
https://www.sorrentoinsider.com/en/getting-to-sorrento-italy