With this one-liner, you can dynamically set the year with the JavaScript getFullYear() function:
let year = new Date().getFullYear();
If you are using amazing frameworks like VueJS or NuxtJS, you can add the current year code directly into your template section
<template>
<footer>Copyright © {{ new Date().getFullYear() }}</footer>
</template>
Happy new years!