Why has my WordPress theme disappeared from my WordPress site?

As mentioned, you should never modify the code of a theme. You should always create a Child Theme that uses that theme. Info about Child Themes – start here https://developer.wordpress.org/themes/advanced-topics/child-themes/

Whenever a theme is updated by the theme author, it overwrites all of the theme code, including the changes you have made to the code.

A Child Theme, however, uses the ‘Parent’ theme, then you add additional code (page templates, etc), placing those files in the Child Theme folder. From the above reference:

A child theme allows you to change small aspects of your site’s appearance yet still preserve your theme’s look and functionality.

Now, with the Child Theme in place, any changes to the parent theme will not affect the additional stuff you added via the Child Theme.

To fix your problem temporarily, assuming you have the modified files locally (on your computer), upload those files to the theme’s directory, overwriting the theme’s original files.

But, long term, you need to put your modified theme files in a different theme folder, and set them up as a Child Theme. Then you can delete the Parent theme, then reinstall it, then activate your Child Theme.