TL;DR; Don’t use functions or methods in the template, use pipes instead.
A pipe would be called only when input values change. A function or a method would be called on every change detection. Here is a nice article if you want to know more about functions in template.
Here is a running stackblitz demonstration of method vs pipe.