The APP_URL is set in your Laravel .env file, Vite doesn't actually use the APP_URL internally, it is only forwarded from your Laravel's environment configuration to give you a quick way to open your Laravel app.
It is used internally by Laravel itself though to for instance prefix generated URLs, so it should be set to the URL that your Laravel application is running on in that environment.
So if you use valet it should be your valet URL. If it's artisan serve it should be set to http://localhost:8080 or whatever port you've specified serve to use. For production it should be set on your web server to your actual website URL.