There are some flute fingerings that allow you to play the same note in different ways. It is useful to use different ones depending on the song you are playing or the previous phrase. Especially, the B-flat Thumb key varies greatly, between # and ♭-based songs. The key is also called “Briccialdi Key”.
How to hold B-flat
I think the first thing you will encounter is the B-flat. There are three different ways to hold the B-flat. Here is a diagram.

The top one (1) is the basic way to hold it. Basically, this is what you need to learn.
The next most useful one is (2), where instead of the right index finger, you can produce a B-flat by pressing the B-flat thumb key with the left thumb together with the B key.
(3) is to use the Ais lever, which is useful for the trills in B and B-flat, but I think this can be done after you become an advanced player.
How to use B-flat Thumb Key
The reason why the B-flat thumb key is so useful is that if you hold down the B-flat thumb key, it does not affect the other notes, so you can play without holding it down. The only exception is the high F#, for which you have to release the B-flat thumb key. (I’ll explain why later.)
In other words, when you hold down the B-flat thumb key, B becomes B-flat, and the rest of the note remains the same. So, when to use the B-flat key is when the key signature is flat. In the key signature of “flat”, the first flat note is B-flat. In other words, in a song in the key of flat, B is always B-flat. (Be careful when you hear a natural in B.)
If the key is C major or the key signature is in the # series, do not hold down the B-flat thumb key. If you need to play the B-flat (or A#), hold it down in the normal way.
I mentioned that the only exception to this is the high F#, but F# is used a lot in songs with a key signature in the # series, so you don’t have to think about it too much. However, F# is also G-flat, which appears when the key signature is five flats. If you have more than five flats, you should think about whether to use the B-flat thumb key or not. If it’s only the middle or low notes, it’s okay to use.
Why only high F# is the exception?
The reason why we need to be careful with only the high F# can be seen by considering the structure of the flute. I’ll draw a diagram to explain.

First of all, B-flat needs to block the orange key in the above diagram. There are a couple of ways to block this. First of all, you can block it by holding down the A key, but this becomes A. The others are the right index finger (1), the B-flat thumb key (2), and the Ais lever (3). These correspond to the three different ways of holding down the B-flat.
The notes lower than A are basically held in the key of A (middle finger of the left hand), so whether you hold the B-flat thumb key or not, it will be the same.
Therefore, the B-flat thumb key only affects the B note, and it is convenient for playing flat tunes because the B becomes a B-flat. (In the case of C note, the left thumb is released, so the B-flat thumb key is also released, so it has no effect.)
However, only the high F# is not convenient. Let’s try to write the fingering for the high F#.

For the high F#, you have to open the sound hole that is blocked by the B-flat thumb key. Therefore, you need to release the B-flat thumb key. The middle F# and low F# are fine because the hole is blocked in these fingerings.
If it’s a key signature of four flats or less, you won’t see it very often, but if you need to play the high F#, be careful and respond by releasing the B-flat thumb key.