Nope, it's different, it could be called "vanilla mods", traditional mods are created in Java or any other JVM language (many are using Kotlin !), but you need a mod-loader for that, the two most used are Fabric and Forge
Datapacks are a totally different things, they are only coded in MCFunction files (files containing minecraft commands), and JSON declarations files, you don't edit the code of the game. The server will load your pack (as a zip usually or just as a folder, in the world folder) using a command ingame, and it will interpret it. You can like add new craft recipes, new advancements with rewards/conditions etc. Datapacks are only for gameplay, for resources like sounds/models/textures you use a resource pack, which is loaded by the client (so each player has to download the resource pack, only the server loads the datapack)