This question for me is compounded by my understanding of a flagship as being commanded by a flag officer, which captain is not. The only permanent (matt decker being a temporary state of affairs) commander of the enterprise with flag rank was kirk as admiral in the early movies.
That is true with navies of today and the past.
However the word "flagship" also has other uses. Often it is a term used to refer to the most prominent, important or leading member of a group.