Using Raku (formerly known as Perl_6)
~$ raku -ne 'BEGIN my @a = "/path/to/pattern_file.txt".IO.lines; \
.put if .starts-with( any @a );' search_file.txt
#OR
~$ raku -ne 'BEGIN my @a = "/path/to/pattern_file.txt".IO.lines; \
.put if .starts-with( [|] @a );' search_file.txt
Above are answers written in Raku, a member of the Perl-family of programming languages. Assuming here that the pattern_file.txt is meant to be fixed strings rather than basic regular expressions, Raku has string-matching functions like starts-with and ends-with. Raku also has Junctions like any, all, one, and none that can simplify this matching problem.
Above the -ne non-autoprinting command line flags are used, which reads input files linewise. In a BEGIN block the pattern_file.txt is read into @a array. In the body of the code, the input line is output if it starts with any element of @a (first answer). Alternatively (second answer), Raku's [ ] reduction meta-operator notation is used to conceptually insert a | OR operator between the elements of @a. The first and second answers give identical results.
Sample Input:
pattern_file.txt
1234
qwerty
chicken
search_file.txt
12345
543212345
qwerty
1fwf32sgww
chicken fingers
Sample Output:
12345
qwerty
chicken fingers
Note: It's tempting to think that a one Junction (or equivalent [^] reduction meta-operator) will accomplish the same task, but this only holds true if each line in patterns_file.txt is unique!
https://docs.raku.org/routine/starts-with
https://docs.raku.org/type/Junction
https://docs.raku.org/language/operators#Reduction_metaoperators
https://raku.org