Minecraft wiki entry for scoreboard, associated text: Syntax
scoreboard players get <target> <objective> (Java Edition)
Description
Return the scoreboard value. Can be used in conjunction with the /execute command: /execute store result ...run scoreboard players get ...
Arguments
<target>: score_holder
Specifies the score holder.
Must be a selection of score holders. It may be either a target selector, a player name, a UUID, or * for all score holders tracked by the scoreboard. Named player needn't be online, and it even needn't be a real player's name. Only a single score holder can be specified, and * doesn't work.
<objective>: objective
Specifies the objective to get score from it.
It must be an valid scoreboard objective name.
Result
Command Trigger Java Edition
... get ... the arguments are not specified correctly Unparseable
the objective doesn't exist Failed
<targets> fails to resolve to a single score holder
the score holder has no score in the specified objective
On success Get the score value.
Output
Command Edition Situation Success Count /execute store success ... /execute store result ...
... get ... Java Edition On fail 0 0 0
On success 1 1 the score's value