I am trying to write a Regex to match a String having 1st 10 characters capital-alpha numeric and then a space and some other text or a String having 1st 10 alpha numeric charac
The $ symbol in [...] is treated literally. Use alternation to require either "space followed by something" or "end of line":
$
[...]
[A-Z0-9]{10}(?:\s.*|$)
Demo: https://regex101.com/r/f4ufzx/1