  We introduce twisted set-theoretic Yang-Baxter solutions and develop an
associated cohomology theory, which extends the standard cohomology theory of
Yang-Baxter solutions. By employing cocycles of twisted biquandles along with
Alexander numbering, we construct state-sum invariants for knots and knotted
surfaces. As an application, we use our approach to distinguish the $2$-twist
spun trefoil from its reverse orientation, in line with prior findings.
