You could do something like this:
import {router} from '@inertiajs/vue3'
const paginateClick = (page) => {
const currentUrl = window.location.pathname;
const query = new URLSearchParams(window.location.search);
query.set('page', page);
router.get(`${currentUrl}?${query.toString()}`)
}