Looking to similar wording elsewhere: you gain the benefits of the Oathbow even if the attack included declaring a target your sworn enemy
Note that the Oathbow grants you benefits
When you use this weapon to make a ranged attack [...]
It doesn't say after you make the attack, but at the same time as making the attack. This isn't particularly strong evidence, but also the item could have been more explicit if the first attack were not meant to gain the benefits.
Furthermore, while looking for similarly worded features I found the Battle Master Fighter's Lunging Maneuver which states:
When you make a melee weapon attack on your turn, you can expend one superiority die to increase your reach for that attack by 5 feet. If you hit, you add the superiority die to the attack's damage roll.
Though it does say that it increases your reach specifically for that attack it still occurs "when you make a [...] attack", which points towards "making an attack" happening before you've rolled to hit or damage.
For some more evidence there is the "Ranged Attacks in Close Combat" section which states:
When you make a ranged attack with a weapon, a spell, or some other means, you have disadvantage on the attack roll if you are within 5 feet of a hostile creature who can see you and who isn’t incapacitated.
This disadvantage clearly applies to the attack you are making which supports that "when you make an attack" refers to the entire process and not once you have completely finished the attack.
Note that speaking the command word does not take any meaningful amount of time; it requires no action whatsoever. In contrast, if it had required a reaction then it could only be taken after you made the attack because reactions (typically) occur after their trigger.
The section on "Other Activity On Your Turn" states:
You can communicate however you are able, through brief utterances and gestures, as you take your turn.
This would also allow you to speak the command word even while doing anything else.
Upon looking more there are other features which happen "when you make an attack" which follow the same rules as above. Here are some examples:
The Barbarian's Reckless Attack feature states:
When you make your first attack on your turn, you can decide to attack recklessly. Doing so gives you advantage on melee weapon attack rolls using Strength during this turn, but attack rolls against you have advantage until your next turn.
Note that this benefits your initial attack without even stating such, making it better evidence than the Battle Master Fighter Maneuver earlier.
Also the Cavalier, Monster Hunter, and Scout Fighter's Combat Superiority features can add a Superiority Die to an attack rolls "when you make an attack".