SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
This error means that your SQL statement has ? parameters (placeholders for bound variables), but you didn't actually bind that many variables to the statement.
For example, if your SQL was:
SELECT * FROM users WHERE id = ? AND name = ?

Then you'd need to bind two variables to the statement - likely with a call like:
stmt.bind_param('ii', $id, $name)

But if you only bound one variable, you'd get this HY093 error since the number of bound variables (1) doesn't match the number of tokens (2) in the SQL.
So you just need to ensure you bind the correct number of variables to match the number of placeholders in your SQL statement.
How do determine how many placeholders I have?
The number of placeholders in an SQL statement can be determined by counting the number of ? parameters in it. For example, in my previous example there are two parameters which are ? parameters: id = ? and name = ?.
By changing one parameter to a fix value it would have only one placeholder. For example:
SELECT * FROM users WHERE id = ? AND name = John Doe

As you can see, in this modified SQL statement the name parameter was changed to John Doe from a placeholder, so now only the id parameter is a placeholder.