Not a mySQL dev (am a SQL Server dev) but the "WHERE" clause looks to me to be in the wrong place. I believe you have an insert statement and you're trying to filter which records you put into the other table?
In that case I'd expect the "WHERE" expression should be part of the "IF" statement. However, another issue I can see (perhaps this is a mySQL idiosyncracy) is you are referencing "articulos.id" - but there doesn't appear to be a table "articulos" in your query anywhere. This makes me think you are trying to insert any records that have "NEW.idarticulo" that is contained in a table called "articulos".
I can see two possible solutions (use one or the other) - though not sure how they will go with mySQL.
Use an EXISTS() clause in your IF statement.
IF NEW.inventariable=1 AND NEW.estado = 'Venta Cancelada' AND EXISTS(SELECT 1 FROM articulos WHERE id = NEW.idarticulo) THEN
Use a SELECT query to insert your records and an INNER JOIN to ensure you only get records that match.
INSERT INTO registro(nombre, stock, tipo, existencia, created_at)
SELECT NEW.articulo,NEW.cantidad,NEW.inventariable, articulos SET stock = stock +
NEW.cantidad,NOW() FROM NEW n
INNER JOIN articulos a ON (n.idarticulo=a.id)
The only problem I can see with the above is the articulos SET stock = stock +
NEW.cantidad part of the query - I'm not sure what you are trying to do here. I believe you are trying to sum up the values as you go - in that case (again perhaps mySQL lets you do this) you would need to verify if a record already exists in registro. If it doesn't exist, you do an insert, otherwise you do an update.
I believe the following is what you would need to use in that case:
mySQL INSERT or UPDATE
All that being said is there a significant gain in keeping the running total over just querying your tables? Triggers (in SQL Server) can have a detrimental effect on application performance in high volume systems. It can be more efficient to just execute a SELECT on your source table (with appropriate indexes) and add the values when you need them.