Your question-title is very broad despite the question-body is asking for only one type of 'cell reference'. I'll try to answer some of the other scenarios in case other people come here looking for them.
A - String comparison with cell reference
=TRANSPOSE(QUERY(MIX!A16:F, "SELECT B,C,D,E,F WHERE (UPPER(A) = '"&F1&"') "))
=QUERY(MIX!A16:F, "SELECT B,C,D,E,F WHERE (UPPER(A) = '"&F1&"') ")
F1 = StringToSearch
B - String comparison with cell reference + SheetName is called using cell reference + Dates comparison using cell reference
F6 = SheetName
F2 and F3 = StringToSearch
I4 and I5 = dates with this format = 2022-01-01 = yyyy-mm-dd
If the dates you have are in a different format, you can use the formula below to convert them
I4 = TEXT(H5,"yyyy-mm-dd")
=QUERY(INDIRECT(F6&"!A2:C") , "select A,B,C where ((upper(B) contains '"&F2&"') or (upper(B) contains '"&F3&"')) AND (A >= date '"&I4&"') AND (A <= date '"&I5&"') ")
C - Data to query comes completely using cell reference
B1 = Sheetname!Range = Sheet1!A1:C
A36 = stringToFind
=QUERY(INDIRECT($B$1),"SELECT * WHERE upper(B) CONTAINS upper('"&A36&"') ")
The "$" in $B$1 make the reference static for column and row, so if you copy/paste the CELL containing the formula (NOT the text of the formula), the A36 adapts accordingly, but B1 stays fixed.
D - Data to query comes completely using cell reference + String comparison using cell reference + Number comparison using cell reference
=QUERY(INDIRECT($B$1),"SELECT * WHERE upper(B) CONTAINS upper('"&A40&"') AND C > "&A41&" ")
B1 = Sheetname!Range = Sheet1!A1:C
A40 = stringToFind = blah
A41 = Number = 100
E - Nested query (query inside query) + String comparison using cell reference + Number comparison using cell reference, using LIMIT and OFFSET
=QUERY( transpose( query(IMPORT!$A$7:AAL,"select * where A contains '"&$C34&"' ")) ,"SELECT * LIMIT " & $A34 & " OFFSET " & $B34, 0 )
The final '0' is there to NOT include the header in the results.