How to find and remove the tracking codes running in my wordpress site?

Try switching to a default theme like Twenty Twenty. If the tags are still running, you’ll know for sure they’re coming from a plugin. And if they’re not running, you’ll know the tags are somewhere in the theme.

(It’s highly recommended to disable editing the theme directly in wp-admin. It is safer to FTP in and upload/download the files, in case any issues arise, so you can easily revert changes. This also makes it easier to search through the files – many editors have a “find in files” search feature so you could look for your specific tracking code, i.e. search for your GA UA- number.)