Updating the OJS in case you made changes to the system files

Can you please tell me step by step what needs to be done to properly update the system if changes were made to the system files earlier?

Depends what you mean with “system files” - the OJS code?

You may look first at {ojs-root-directory}/docs/UPGRADE.md and UPGRADE-UNSUPPORTED.md , then think about your upgrade strategy.

First, it much depends on whether code changes have been documented properly (we do that both in the code and via an issue tracking/project management software).
Second, it is good to have a development/test and production environment.
Third, it depends from which software version to which one you would like to upgrade.
Depending on these factors, you can then develop your scenario. There is not a single way to do that.