If you are using Portal Engine page then try below on Layout -
<%=DateTime.Now.Year%>
If you are using any web parts like static HTML, Editable Text, Static Text then using the following macro -
{%DateTime.Now.Year%}
Refer- https://docs.xperience.io/k12sp/macro-expressions/macro-syntax