WP core, theme, plugin updates can mess up a lot of features. Here we’ll see a few ways of adding your own custom stuff without breaking anything or at least reducing the risks.
#1- Child theme
An advanced option, ok if you are a coder and want to go crazy with your custom code – do it in your child theme.
#2- A plugin
Sometimes you just need some additional features, a plugin is the way to go there. Good for widgets, shortcodes, and the best part is that you can find a lot of free / premium plugins out there to do the job.
#3- Custom CSS
Most themes provide that field, and CSS isn’t really rocket science. Once you get used to it you can do some cool things with CSS only (maybe list a few examples, pseudo elements, disable click…)
#4- Custom JS
Most modern WordPress themes come with an “integration” field, for Google Analytics or similar code. Well, you can use that one as well for some jQuery wizardry.