## plugins – How to solve conflict with scripts?

Question

I have a problem, I created the first pluggin and after adding it to the production site, it turned out that the scripts also work for other things that are on other subpages – where there is not even a plugin.

My guess is that it’s because I registered add_action (wp_head) or (wp_footer). How can I do to record the action where only the shortcode is used?

edit:

I tried:

if (is_front_page()){