Override means to add to or enhance something apart from its existing behaviour. It is used very commonly in programming languages. For example, you have generic procedures and rules that all the employees of your company should follow, but you also want the HR team to follow additional procedures. So, the HR team will override the existing procedures and enhance them to add their specific procedures. But that doesn’t mean that the existing procedures are removed. Both will be there.
Same way, the slices of bread popup automatically when the toaster is done toasting them. But there is also a manual stop button which overrides the automatic functionality. As soon as you press stop, the slices of bread popup whether the toaster is done toasting or not.
Overwriting something is to completely remove the old version and then add a new version. The previous version is then lost. For example, if you have a shared copy of a document, and write some content, but someone else accesses it, writes their content and commits the changes, then your changes will be overwritten or lost. It is similar to replacing content with another and mostly used in computing and data contexts. Example,
“While you try to override the content with your implementation, make sure you don’t overwrite it completely!”