Step-1 : See by running "npm update" to rectify issue due to breaking changes pushed by some package in project dependency
For Example, in my case the issue fixed by updating below package,
npm update @react-native-community/netinfo
Step-2 :
change Sdk Versions in android/build.gradle file to minimum required:
compileSdkVersion = 31
targetSdkVersion = 31
Step-3 :
add the below line in android/build.gradle file under
androidXCore = "1.6.0"