How to edit plugins code?

You’re going to be prompted periodically by the theme to apply updates. The simplest solution is don’t press the button.

If you fork then there’s a fair chance that Discourse updates will come along and break the site design completely if you’re using a theme which isn’t being updated. At that point you’re going to be stuck until you switch back to the original theme your design is based upon.

This topic is about plugins though, themes aren’t installed or updated in the same way as plugins any more - there’s a whole UI in /admin/customize to manage and configure themes and theme components.