currentUser data doesn’t update after changes to it when opening/closing a modal

i have a user profile modal in my next app where its data and the user can change it by typing in inputs. The problem is that old data doesn’t overwrites in modal when i open it or close but in my db it changes. I can get new data only after page refresh.

How i render it:

  <>
    {children}
    <LogOut />
    <Profile />
  </>

Modal:

export const Profile = () => {
  const searchParams = useSearchParams();
  const pathname = usePathname();
  const profileModal = searchParams.get("profileModal");

  const { currentUser } = useGetCurrentUser(); // get data from a custom hook

  return (
   ...
  );
};