They. Cryptic, didn't coin the use of the phrase Flagship in Star Trek. The Star Trek writers did. In the parlance of Star Trek, the flagship has always been the most advanced ship of it's day. A ship crew by the best and brightest of Starfleet. The flagship exemplifies everything that the Federation and Starfleet stand for.
For the Federation that flagship has always been a starship called the USS Enterprise. Every Enterprise has always been a guardian of galactic peace, been at the forefront of exploration, discovering new lifeforms, making contact with new civilizations. Boldly going where no one has gone before...
This has been addressed in earlier posts the idea of the Enterprise D being the flagship of the Federation comes from ignorance of what the term flagship means. But your right that is what flagship now canonically means in Star Trek still its a facepalm for those who know naval parlance.
Nowadays I'm pretty sure Aircraft Carriers serve the purpose of flagship in the US Navy although they are certainly a prime target, Carrier battle groups are basically designed around protecting them so it makes sense. I remember for a time the US Navy had a special ship class made for Admiral with a lot of dedicated communications tech but I'm pretty sure all of these have been retired. In the 1700s and 1800s the flagships of the European navies were pretty massive ships of the line.