Your code is not complete, this is just my guess.
setup() is vue3 syntax, also called combinatorial api, data(){} is an early vue2 function, you seem to be mixing it up here. I'm not sure what the outermost return{} means?
You can visit the link below to know a little bit about the usage in setup. By the way of course this is one of the ways to write vue
https://stackblitz.com/edit/vitejs-vite-gbsseybj?file=src%2FApp.vue