headScript()->appendFile

can sombody tell me ,why i get src meny time

Do not echo while specifying a script tag. so correct way is to append first and then output all scripts https://pimcore.com/docs/5.x/Development_Documentation/MVC/Template/Templating_Helpers/HeadScript.html#page_Basic-Usage