If u are interested in visiting heritage sites related to mythology then hampi is the best option. Also, sunrise and sunset in hampi are the best. If u are going just for relaxation then ooty is a good option as it is covered with greenery.
Depends on your taste. If you have interest in heritage and mythology, Hampi is the place. Ooty us a very pretty hill station. But if you are planning anytime soon, Hampi will be very hot. Better go to Ooty.
It’s quite hard to answer as both have different values, Hampi gives you a slight historical feel whereas Ooty and coonoor has a hill station vibe.
Also depends on the month of travel.
I would choose Hampi though.