I mean it would be better to restrict deleting apps on your macOS unit.
1.To get started, open theSystem Settingsapp on your Mac.
2.Now, click onScreen Time.
3.Next, click onContent & Privacy.
4.Next up, confirm that the toggle forContent & Privacyis turned on.
5.After that, click onStore Restrictions.
6.Up next, tap on the toggle forAllow Deleting Appsto turn it off.
7.In the end, ensure to click onDoneat the bottom to confirm the action.
And thats about it!
From now onwards, apps will no longer be deleted on your Mac.