Some programming languages are different but all have some form of memory management. Reuse as much as should be. Stuff like reusing a variable in Javascript to hold another type may in fact be faster. With that how to reuse in functions is key.
Kotlin and Java have what is known as pass by reference with arrays, lists, and objects, actually reusing same memory, and pass by value, anything else like primitives which makes new memory when passing
Passing in a variable to a function to use should help.
Like an array of 1000 values to be used should be reused. 1 value, maybe consider just inside functions making it. It does depend on how much you are using but for large scale, reuse everything you can nearly. There is a cost to passing things to and from things.