sshpass is used this way, ie. you have to run an actual ssh command via sshpass. In your case it will be:
sshpass -p password ssh -XC USER@SERVER
So sshpass by itself doesn't have to know anything about X forwarding, because ssh handles that. The only job sshpass does is provide the password to ssh.
Please be aware that specifying a password on the command line (like in the example above) is insecure. sshpass offers alternative methods to provide a password: from file or from an environment variable (details in link).
However, the best method to use ssh without having to type a password is to configure key-based authentication, as @user68186 mentioned. Here is a tutorial how to do that.
sshpassbut private-public key based authentication works well. – user68186 Feb 11 '21 at 14:25