how to call function with that command?

test is number from scoreboard $execute as @s[tag=$(test)] run say test

Continue to help post