How to add the google ad conversion tracking code into the thank you page

You can try to add conditional code like this:

<?php if (is_page ('thank-you')){ ?>

  // script goes here

<?php } ?>

NOTE: Replace the thank-you with your page slug or you can even replace it with the page ID and add your tracking code just below //script goes here.

One more way is to do it via plugin, here is a link to such plugin https://wordpress.org/plugins/oh-add-script-header-footer/