By using version control and reading the history.
Add everything to a git repository and have the freelancer work via
git. Don't allow them to use the built in WP edit files screen, use a modern flow using services such as GitHub/BitBucket/etc or a private git repository.
What if The Freelancer Added a Backdoor?
It will show up in git history, the only way to be sure is to check by reading the changes. But if you're this distrustful of the freelancer maybe you should find another one? It already sounds like your business relationship is stretched thin
What if The Freelancer Tampers With Git
Git hashes aren't random, and there's a lot of cryptographic data integrity checks and science that has gone into Git. Tampering with history this way will be easy to catch, and difficult to pull off
There's even a command called
git fsck that will check your git repos object database for connectivity.
What if I don't trust either of those?
Compare it to a backup taken before they got access and read the diff.