This can be easily solved, you have missed a "*" in front of "-Filter" (2x). Please try it like that:
Get-ADOrganizationalUnit -Filter * | Where-Object {-not ( Get-ADObject -Filter * -SearchBase $_.Distinguishedname -SearchScope OneLevel -ResultSetSize 1 )}
This will help you find the empty OUs.
Regards
----------
(If the reply was helpful please don't forget to upvote or accept as answer, thank you)