Code on Product Page

Hey
I have product1 page with button to product2 page (standard product page, not mine)
Code is running only first time when I arrive to product1 from not product page.
Clicking on the button changes the content but doesn’t perform code (so simple as onReady->console.log).
(Velo Tutorial: Creating Previous and Next Buttons for a Dynamic Item Page with Code | Help Center | Wix.com works once)
Why?
Thanks in advance

Hi,
Can you please share with us the code you’ve written?

Thanks,
Tal.