Add suppressHydrationWarning this is what the official documentation says;
Note! If you do not add
suppressHydrationWarningto your<html>you will get warnings because next-themes updates that element. This property only applies one level deep, so it won't block hydration warnings on other elements.