Custom Enchantment

I want to make a Datapack wich adds 2 enchantments. One to amplify bow damage and one for sword damage. Asking gpt gave me 2 options A: create a custom effect, B: create a scoreboard to store and manage data. I want to use option B. 1. How do a make a scoreboard and read/write to it using datapacks? 2. How do I add a custom enchantment? 3. How do I amplify the damage? 4. Can I add that enchantment without commands using books to an item later?
Continue to help post