Define the function at the ProductController and use this route:
Route::get('/{product:slug}', [ProductController::class, 'showProduct']);
In this case the function would be called showProduct.
Solution:
Route::get('/product/{product:slug}', [ProductController::class, 'showProduct']);
Because just ('/{product:slug} will match other routes too. Using /product/{..} creates a unique route.
Define the function at the ProductController and use this route:
Route::get('/{product:slug}', [ProductController::class, 'showProduct']);
In this case the function would be called showProduct.