Is it
the letter "q"?
Don't confuse me with a line
A line may contain me
Don't confuse "q" with "queue", another word for "line". Also, a line of text may contain an "q"
And I may contain a line
But that's not my identity
"q" contains a line, but it's more than just a line.
I have one best friend
Though I don't often appear
The letter "u", but "q" is not frequently used
When I do show up
He's almost always near
"q" and "u" come together, usually
I can be round and tall
And may touch facial hair
Uppercase "Q" is round and tall. The lowercase "q" has a descender! Descenders in letters reach downward toward the "beard line" in typography.
But even when I'm alone
You may still see two there
An upper-case cursive "Q" looks a lot like the numeral "2"!
Find me in ancient places
I am worth quite a lot
"Q" is found in "quasars", which are ancient, else we couldn't see them. Also, the Greeks only used the letter "Q" for the number 90, but the Etruscans and Romans kept it for "Q". Also, it originated as the Phoenician symbol qop. "Q" is worth quite a lot in the game of Scrabble.
I can bring about the end
But I'm rarely in that spot
Pressing "q" to end a program (old-school). Also, very few words end with the letter "q".