When using Centiscorch VMAX's "G-Max Centiferno" attack, do I get +40 more damage for the Fire energy I attach during the attack?
No, the attachment of Fire Energy from the discard pile takes place after the damage calculation of the attack is done. Also, you don't get to attach the Fire Energy if the attack didn't do any damage.
Source: Darkness Ablaze FAQ (2020-07-31), TPCi Rules Team (2020-08-13)

Relevant cards

Note: All applicable cards may not be listed below.
SWSH3_191
SWSH3_191
SWSH3_34
SWSH3_34