This comes up a lot so I thought I would throw in my 2 cents.
I suppose if a true daytrip i would say go straight to Perast and do the boat to the island of Gospa od Škrpjela (Our Lady of the Rocks); and around Sveti Đorđe (St. George) island and on to the Blue Caves. Then a short tour of the town before heading back.
But this is too good for a day trip. So spend a night and and sleep in Kotor. Stop in Herceg Novi on thr way back to Dubrovnik.
Still, a better use of time and an amazing trip is two nights. Go straight to Perast and do the boat to the island of Gospa od Škrpjela (Our Lady of the Rocks); and around Sveti Đorđe (St. George) island. Then few hours in Kotor before crossing over the mountain with a stop at a prosciutto curing house on the way to Budva Old Town for the night. The next day to a olive plantation/oil producer near the Albanian border, then a winery in the high mountains. Back to Budva for the night. Last day, head back to Dubrovnik with a stop in Herceg Novi. Better yet, fly home out of Podgorica or Tivat.
A bit more here https://community.ricksteves.com/travel-forum/montenegro/a-week-trup-report