Correct index not being used by Mariadb
select  count(*)
    from  symbol_details
    where  tsetmc_id = 41974758296041288
      and  created_at &gt;  '2020-06-20'
      and  created_at &lt;  '2020-06-31';

Optimal index, in this order:
INDEX(tsetmc_id, created_at)

When you started with the range value, it could not go past that to the 'id'.  The simple rule is:  Put the = columns first in the index definition.  More:  http://mysql.rjweb.org/doc.php/index_cookbook_mysql
Further notes

The optimizer may decide that a table scan is faster than bothering with the INDEX.  This usually happens when it appears that more than about 20% of the table needs to be touched.  (Using the index implies bouncing back and forth between the index's BTree and the data's BTree.)  If it shuns the index, don't worry; it is probably a wise decision.

The order of the columns in the index is critical when a &quot;range&quot; is involved.  The Optimizer will stop considering columns once it gets past the &quot;range&quot;.