Changing NBT of an item in a container in 1.17

Solution 1:

This would require a lot of NBT modification. Let's look at what the completed NBT of your item should look like:

{
  AttributeModifiers: [
    {
      AttributeName: "generic.attack_damage",
      Slot: "mainhand",
      Operation: 0,
      Amount: 10.0d,
      UUID: [I;382757,9285892,28488284,19948385]
    },
    {
      AttributeName: "generic.attack_damage",
      Slot: "mainhand",
      Operation: 0,
      Amount: 10.0d,
      UUID: [I;382757,9285892,28488284,19948387]
    }
  ],
  Enchantments: [
    {id: "minecraft:fire_aspect", lvl: 2}
  ],
  display: {
    Lore: ['"Wildfire"']
  },
  Level3: 1b
}

You can modify the data of an item in the dropper using the following command:

data modify block ~ ~ ~ Items[{Slot:4b}].tag merge value …

From there, insert the NBT data I placed above.