Where is the best town to stay in during October to make day trips around the Alamfi Coast?
The first question to ask is what are your priorities to see and do? Is this strictly a visit along the Amalfi Coast or are you wanting to include Capri and Pompeii? If Pompeii is important then I would recommend Sorrento. While it's not on the Amalfi Coast it is a good transit hub and a great place to stay in the evenings after your day trips and the train to Pompeii is 35 minutes and the ferry to Capri is 30 minutes. If you only want to travel along the Amalfi Coast then Amalfi Town makes a lot of sense because it is the transit hub for the AC with busses and ferries; but it is crowded during the day.
Your question is asked pretty often here, so you can get more information than would ever appear in a single discussion by using the Search box top center:
(You can click to filter for 2 years, but the answers don't really change for the Amalfi Coast.) In addition to the excellent first answer you got, your arrival and departure day plans make a difference. You cannot wake up on the AC and fly home from Rome the same day. Even a Naples departure can be risky, depending on flight time and where you decide to sleep.
Budget is a factor, in that while busses are cheap, they can be crowded and slow. But taxis from Amalfi to Sorrento (or Pompeii) are very expensive. You might wish to check air and water temperatures for October, on one of many Climate sites. This is the tail end of the shoulder-season.
If you want to see the Amalfi Coast, then Amalfi is the best town to stay in. You can get to Positano by bus or ferry, you can walk to Atrani and take the bus to Ravello. Staying in Amalfi is also nice because in the late afternoon and evening the towns are not as crowded after all the day trippers leave.
We are staying 2 nights in Sorrento with a day trip to Ischia which is known for their great thermal baths (rather than the more touristy Capri). Brief stop in Positano. Then 2 nights in Maoiri for several reasons, We had wanted to walk the Garden of the Gods but will have to wait for our next trip. A friend was just there and there is the "lemon walk" between Maiori and Minori (awesome bakery) and a fabulous restaurant in Maiori where 3 sides of it are on the water! https://torrenormanna.ovh/home-en/
While there hope to visit Ravello and Tramonti . On departure, We will take a ferry to Salerno to catch our train to Florence after that.