Best practice to add personal modifications to updated external code?

Problem to solve

To an external laravel project installation on a personal host, which I had commited as first main branche (GitLab selfhosted), I added serveral code modifications and enhancements always commited them to branches. The provider of the external project code releases about once a year an update with the files that have been modified by overwritting and/or adding code files.

I installed this external update over my modified installation and thus my modifications are overwritten by the external update. I commited this situation also as a separate branch.

Now I can compare in GitLab Webview the differences between the branche with my modifications and the branche after the update with the external upgrade.

Actually I have no idea how I can best merge in GitLab my modifications to the updated external code. I think I had to merge manually as my modifications are shown as code to be removed in the branche comparison view.

I would be very grateful for any recommendation for a best practice how to handel this merging process also in the consideration that on the next code update from the external provider the merge process has to be repeated again.

many thanks in advance.

Steps to reproduce

Configuration

Versions

Please select whether options apply, and add the version information.

Helpful resources