At WordPress Dashboard, mouse hover at the Scripts Organizer menu on the sidebar and select Code Blocks
You will reach at a table page that shows all available Code blocks on the site click Add New
Screenshot below show the Code block edit page. You can refer to the function on each buttons here
Add title and select Script Location, the recommended location for each type of codes are
CSS -> Header
JS -> Footer
Tracking script -> Please check at the official guideline from each script provider to select the most proper location but if you can’t find it please put it in Footer
Once we select the location, there will be a tab appear on editor area and a dropdown menu to choose which type of language you are going to add. Also, there is a checkbox titled Create file which allow us to choose whether to create this script as a file or just add it inline on the page
Note about the code if you select HTML but you wanted to put the CSS or JS you might have to wrap it with <style> or <script> otherwise the code will be error
Select specific Page, Posts, Custom post type, or Taxonomy under Template section
You can skip the rest options if you wish to have this script run after save (don’t forget to turn the Enable Code Block switch to on)