Very Simple. You create a app and all modules you create should be limited to this app. And all new doctypes, reports, print formats, tools, pages must stay in your app’s modules.
Then you export the Customizations to doctypes via Fixtures. These fixtures are stored in your custom app. All the customizations, custom JS or python methods, reports, doctypes etc. stay in your app while ERPNext and Frappe remain untouched.
Some help on fixtures: Schema modification export (custom fields) - #2 by root13F
If you are well acquainted with ERPNext, I suggest you study Aditya Duggal’s Custom app provided here : rigpl-erpnext/rigpl_erpnext at master · adityaduggal/rigpl-erpnext · GitHub