How to use Twig expression in content fields and render?
You cannot use Twig code as field value. You have to put that code in a template file. Or you can use Twig code in Views field value rewriting (but not as field value). 2nd is limited to variables of the view that are before to rewritten field. The function can be found in Views UI by clicking on the field name in the "Fields" section.