If you want to execute something when someone has hit a certain score, use this:
/execute if score @p apples matches 10 run say I have 10 apples!
You can change the @p with another person (and if you want it to run for every player use this: /execute as @a if score @s apples matches 10 run say I have 10 apples!), you can change the 10 to any value and you can change the command that is run after.
Help
If you want to execute something when someone has hit a certain score, use this:
/execute if score @p apples matches 10 run say I have 10 apples!
You can change the @p with another person (and if you want it to run for every player use this: /execute as @a if score @s apples matches 10 run say I have 10 apples!), you can change the 10 to any value and you can change the command that is run after.
Hope this helps!
Command FAQ
Minecraft Randomizer DataPack (by Me)