Hello @b.da.
Indeed, I am currently developing the Future2021 theme (Future fork) and I try to improve it a little more every day.
Currently, the theme has social media icons both in the left sidebar and in the footer, as well as in each blog post.
The icons on the left side are defined globally in the theme (as in the Cacti theme and others) and are used to direct the user to the social networks of the page author.
I want to use the blog article icons to share that particular article on social media. I currently have code with if statements and variables defined on the page (as you propose in your answer), and it works great:
In administration:

And in blog_item.html.twig this code:
{% if header_var('facebook')|defined(true) %}
<li><a class="icon brands fa-facebook" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={{ page.url(true)|e }}" ariba-label="Facebook" title="Facebook"></a></li>
{% endif %}
{% if header_var('twitter')|defined(true) %}
<li><a class="icon brands fa-twitter" target="_blank" href="https://twitter.com/intent/tweet?text={{ page.title|raw }}&url={ { page.url(true)|e }}" ariba-label="Twitter" title="Twitter"></a></li>
{% endif %}
{% if header_var('whatsapp')|defined(true) %}
<li><a class="icon brands fa-whatsapp" target="_blank" href="https://wa.me/?text={{ page.title|raw }}. {{ page.url(true )|e}}" data-action="share/whatsapp/share" aria-label="Whatsapp" title="Whatsapp"></a></li>
{% endif %}
{% if header_var('telegram')|defined(true) %}
<li><a class="icon brands fa-telegram" target="_blank" href="https://t.me/share/url?url={{ page.url(true)|e }}& text={{ page.title|raw }}" aria-label="Telegram" title="Telegram"></a></li>
{% endif %}
The result is:
Desktop mode

Mobile mode

In this case, I cannot use a For loop, because each link to a social network requires different parameters.
I just wanted to know if I could simplify the selection of these icons with a Switch statement and checkboxes.