There is documentation about Asynchronous Page in the Next.js:
https://nextjs.org/docs/app/building-your-application/upgrading/version-15#asynchronous-page
Try that approach, which is in the Next.js documentation:
export default async function Challenge(
props: {
params: Promise<{ slug: string }>;
}
) {
const params = await props.params;
const productID = params.slug[1];
// const productID = params.slug;
// other code here
}