IF INDEX
=INDEX(IF(A1:A1000="Example", B1:B1000,)
Uses a simple IF function where the value_if_true is Column B and the value_if_false is an empty value.
The IF function is wrapped in INDEX which causes it to behave as an array function thus applying the formula across the range, Rows 1 to 1,000 in this example. ARRAYFORMULA could be used instead but INDEX is less characters to type.
IF LAMBDA MAP
=MAP(A1:A1000, B1:B1000, LAMBDA(a, b, IF(a="Example", b,)))
More complicated approach MAPs the column values row-by-row into a LAMBDA function that stores the current row's values in variables a and b respectively and the LAMBDA's formula then performs the test using the variable names until all rows are completed.