Geordi's use of the phrase "The flagship of the Federation" was correct when referring to the NCC-1701-E in Star Trek: First Contact
because the Sovereign-class Enterprise
was the most advanced at the time.
can also be used to refer to a ship when it is the lead ship in a fleet of vessels, a designation given on account of it being the largest, fastest, newest, most advanced, most heavily armed or, for publicity purposes, the most well known.
Its use is not exclusive to refer to the ship used by the commanding officer of a fleet of ships.