Let's break it down simply
A Vue component can have <script setup>, <template>, and an optional <style scoped>. Split components into small pieces, each with one feature or responsibility. Once a component is imported in <script setup>, you can use it directly in the template.
vue
<!-- CounterButton.vue -->
<script setup>
import { ref } from 'vue'
const count = ref(0)
</script>
<template>
<button @click="count++">Clicked {{ count }} times</button>
</template>
<style scoped>
button { padding: .75rem 1rem; }
</style>You should see
Clicked 0 timesTry it yourself
Create an AvatarCard.vue component and reuse it three times inside App.vue.
Components Basics — Vue.js