I’m not sure where you got your information. Restaurants throughout Italy generally open for lunch from 12 or 12:30pm until 2:30/3pm. They then reopen for dinner at 7/7:30pm and close at 10pm or later. I checked some restaurants in Alberobello and Locorotondo I went to when I was there in summer 2023, and those are the opening times also this week. Shops generally open at 8:30 or 9am, close between 12:30pm and 3:30pm, then reopen until 7:30 or 8pm, however some stores, especially department stores, do not close at all during the midday hours.
Small seaside locations (like Tropea) are destinations that are popular in summer months when Italians go to the beach, but obviously will be largely deserted in winter, so several restaurants and bars and also shops might close totally for the season. Many restaurants and bars at those types of locations are managed by owners of restaurants who also have a restaurants in larger towns and close the seaside locations for the winter months, when they open only the big town location.
But that is not what you are going to experience at the destinations you mentioned. Alberobello is a destination that is popular, especially on weekends, all year round, so it is unlikely restaurants and bars will all shut down. Bari, Lecce, Matera are provincial capital cities, with larger meteo areas with populations, respectively, of 1,3 million, 700,000, 150,000 local residents, therefore, even thought there will be fewer tourists than in other months, will still have plenty of restaurants and other establishments that are open for locals, who obviously go out too. At those locations most restaurants and shops will have the opening hours I mentioned above.
For churches and museums you will need to check the individual venues’ websites. Museums don’t observe midday closures like shops, but some may open only in the morning until 1pm. Smaller churches may open only during service hours in the morning and in the early evening, and be closed at midday. Large cathedrals probably open longer. Winery tours are sometimes open only on weekends, and close by 5pm, but you need to check the individual wineries.