Data Driven Enchantments are something that was introduced by 1.21, it is a total rewrite to how enchantments are implemented through code, to make them customisable to an end user through datapack. This guide's examples are in Mojmap, which may not be the mappings you are using. I will provide Yarn names for important classes, but otherwise, I'd recommend Linkie for remapping class/method/field names.
Data driven enchantments belong in the data/<namespace>/enchantment/
folder.
I'd highly recommend datagen as enchantment JSON can get complicated pretty quickly, especially with predicates and all, explaining datagen is out of scope for this guide, but it will help knowing how to use it.
Enchantments in data are structured as follows: | Field Name | Type | Default | Description |