how do you use scoreboards with /item modify to change item attributes

like if I could hypothetically just do /item modify entity @s weapon.mainhand myattribute = myscoreboard
Continue to help post