Hello @NiteshSingh ,
If your usecase is to display the last 4 digits of account number by masking it. we have below mask function,
{%= mask("123443216789",0,4) %}
- this function will keep last 4 digits as it is and mask the remaining as X.
Output - XXXXXXXX6789
If your usecase is to get last 4 digits for other calculation you can refer the code suggested by @dugganab