Trigger with multipe IF conditions doesn't trigger
Debug your trigger.

Create service table.

CREATE TABLE service (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
                      step INT,
                      data TEXT,
                      dt TIMESTAMP DEFAULT CURRENT_TIMESTAMP);


Add tracing info save (example code).

CREATE TRIGGER update_latest_activity
    AFTER INSERT ON activity
    FOR EACH ROW
BEGIN
    INSERT INTO service (step, data) VALUES (1, NEW.log);
    INSERT INTO service (step, data) VALUES (2, NEW.log = 0);
    INSERT INTO service (step, data) VALUES (3, NEW.type);
    INSERT INTO service (step, data) VALUES (4, NEW.data);
    INSERT INTO service (step, data) VALUES (5, JSON_VALID(NEW.data));
    INSERT INTO service (step, data) VALUES (6, NEW.data-&gt;&gt;'$.status');
    INSERT INTO service (step, data) VALUES (7, NEW.log = 0
                                                AND (NEW.type = 'hired'
                                                OR (NEW.type = 'note'
                                                    AND JSON_VALID(NEW.data) = 1
                                                    AND NEW.data-&gt;&gt;'$.status' = 1)));
    IF NEW.log = 0
        AND (NEW.type = 'hired'
        OR (NEW.type = 'note'
        AND JSON_VALID(NEW.data) = 1
        AND NEW.data-&gt;&gt;'$.status' = 1))
    THEN
        INSERT INTO service (step, data) VALUES (8, 'Execute THEN branch');
        REPLACE INTO
            latest_activities (employee_id, activity_id)
        SELECT
            pivot.employee_id AS employee_id,
            pivot.activity_id AS activity_id
        FROM
            pivot
        WHERE
            pivot.activity_id = NEW.id
            AND pivot.type LIKE '%Employee';
    END IF;
END


Insert record which must (as you think) to perform the action.

Analyse the info in service table.