(Java Minecraft 1.14) Call SelectedItem Damage Tag

An example code:
run initialy: /scoreboard objectives add damage dummy
run repeatedly: /execute as @a store result score @s damage run data get entity @s SelectedItem.tag.Damage
this stores for each player the damage of the item in his hand in the scoreboard damage.