The quote you give for the effect of blade ward lacks the most important word in answering this question:
Until the end of your next turn, you have resistance against bludgeoning, piercing, and slashing damage dealt by weapon attacks.
"Weapon attacks" is a well defined phrase in D&D 5e, and refers to all things which are attacks and not spells, approximately. The important thing here is that some thing cannot be a weapon attack if it is not an attack; "weapon attack" is a special type of "attack".
Whether or not a trap makes an attack is covered by a previous question. Short version: if it makes an attack roll, then it's an attack. If the description states that it is an attack, using the exact word "attack", then it's an attack.
As mentioned earlier, some spells also require attacks, and those are "spell attacks". Other attacks are "weapon attacks". I haven't found a perfect explanation for how to distinguish 100% of the time, but I would say that if a spell calls for an attack roll, or an ability uses the exact phrase "spell attack", then it's a spell attack. Note that attacks with magic weapons are still weapon attacks even if they deal magical damage.
If a trap meets both requirements, i.e. it is an attack and it is not a spell attack, then blade ward would provide resistance against its bludgeoning, piercing, and slashing damage.
For example, here is the first trap I could find on dndbeyond, the Hunting Trap:
A creature that steps on the plate must succeed on a DC 13 Dexterity saving throw or take 1d4 piercing damage and stop moving.
The Hunting Trap requires a saving throw in order to avoid the effect. It does not make an attack roll, so it is not an attack and blade ward will not grant resistance against its damage.