https://www.xda-developers.com/uninstall-carrier-oem-bloatware-without-root-access/
pm uninstall -k --user 0 NameOfPackage
pm install-existing NameOfPackage
you can simply use “adb shell cmd package install-existing ” in ADB and you’ll get the package back .
Examples:-
adb shell pm uninstall -k --user 0 com.android.something
adb shell cmd package install-existing com.android.something