defineExpose, for the one method a parent needs

A script setup component is closed by default, so a template ref to it exposes nothing until something is declared.

<script setup>
const input = ref(null)

function focus() { input.value?.focus() }

defineExpose({ focus })
</script>

// the parent
const field = ref(null)
field.value.focus()      // works only because of defineExpose

Being closed by default is the correct choice and is a behaviour change from the Options API, where every method was reachable through a ref. Exposing one method deliberately reads as an interface; the previous arrangement exposed everything and made every internal method part of the contract by accident.