This is quite difficult since preferences can't exactly be proven by research which brings up the answer: whatever works for you.
Take the cielo24 article for instance. It promptly states that:
If the student is trying to take notes while they are watching the video, the subtitles will make it easier to copy what is being said. Watching a video with subtitles and taking notes has been shown to increase vocabulary and the casual use of the language.
Thus watching the movie with L2 subtitles will assist you in note-taking. With note-taking, vocab and fluency will naturally increase as writing down the notes will allow your brain to keep the information in better. With subtitles really in general, it also states:
When a student is able to read the words as they are spoken on the video, they are able to process the word visually, which improves comprehension.
Visual learning also improves listening comprehension for many learners. By engaging more than one sense simultaneously, students are able to process information on a deeper level.
Now with any subtitles, you can also learn a whole lot better if you are more of a visual-audio learner. Assuming the spoken language is in your L2, L1 subtitles will allow you to associate L2 words with the proper L1 words. L2 subtitles will simply allow you to see what they are saying, including grammar and vocabulary.
Now other articles do claim otherwise but it is your preference in the first place if you use subtitles at all. Based on other answers and personal experience, subtitles will definitely help.
What do you do with subtitles really? Your preference.
You can watch it with subtitles while:
Pausing when there is something you don't know: Yay! This means you really are trying to learn and more importantly, you can gain some more vocab and grammar.
Comparing L1 subtitles with L2 language spoken: If you hear the L2 then compare it with the L1 subtitles, you can get a rough and maybe accurate idea or definition of what the speaker is saying
Comparing L2 subtitles with L1 language spoken: You will probably understand very well your own native language and like the above, you can get a rough and probably more accurate idea or definition of the subtitles.
All L2 (spoken and subtitles): If you can't hear everything, subtitles can help by simply list what the speaker is saying so you can actually understand what is being said. This is usually more common as you are not trying to sort L1 from L2 and is technically part of the direct method, which only allows usage of the language you are learning.
All L1 (spoken and subtitles): Umm... you are probably watching this for leisure but try to translate what is said as you watch the movie.