Change 'Log in', 'Log out', 'My account' menu text Is there a way that the default text in the account menu can be changed within the theme?
I needed to do the same but for a lot of items so working with the menu--account.html.twig was more confortable for me.

You can pick up string variable by using getUntranslatedString() method :

{% if item.title.getUntranslatedString() == 'Log in' %}
  &lt;li{{ item.attributes.addClass(item_classes) }}&gt;
  {{ link("new login text", item.url) }}


And if you want to do it for multiple strings :

{% if item.title.getUntranslatedString() == 'Log in' %}
 &lt;li{{ item.attributes.addClass(item_classes) }}&gt;
 {{ link('New login text', item.url) }}
{% elseif item.title.getUntranslatedString() == 'My account' %}
 &lt;li{{ item.attributes.addClass(item_classes) }}&gt;
 {{ link('new my account' text, item.url) }}
{% elseif item.title.getUntranslatedString() == 'Log out' %}
 &lt;li{{ item.attributes.addClass(item_classes) }}&gt;
 {{ link('new log out' text, item.url) }}
{% else %} {# when there is no match with the previous conditions #}
  &lt;li{{ item.attributes.addClass(item_classes) }}&gt;
  {{ link(item.title, item.url) }}
{% endif %}


Be sure to put your conditions before the trailing &lt;/li&gt;