If you are using expo just use npx expo install --fix to upgrade all dependencies to match the installed SDK version.
npx expo install --fix