How to filter the items that match both?

Hi.

You need to use and() condition.
Note that when chaining multiple WixData Filter functions to a query an add condition is assumed.

In your case, just remove or() and chain eq() as shown below:

.eq("red", $w("#checkbox1").checked)
.eq("size42", $w("#checkbox2").checked)

Good luck!