@julio
Googlebot, the web crawling bot used by Google, can execute JavaScript to some extent, but its ability to do so is not as comprehensive as that of modern web browsers.
Google has been able to execute JavaScript since 2008, and it has continued to improve its ability to do so over time. In general, Googlebot can execute most basic JavaScript functions and scripts, but it may struggle with more complex scripts or those that require user interaction. Googlebot also has a limited amount of time it will spend on a page, so complex JavaScript that takes too long to execute may not be fully processed.
It's worth noting that Google recommends designing your website so that it can be fully crawled and indexed without relying on JavaScript. This is because some search engines and users may not have JavaScript enabled, so important content or links should not rely solely on JavaScript to be accessed. However, if you do use JavaScript on your site, it's a good idea to test how it is interpreted by Googlebot using tools like the Google Search Console or the Fetch as Google feature.