Help with making a trigger Mysql
I changed a bit

What you want has to be a BEFORE INSERT TRIGGER

The weight i couldn't find in your trigger

Because every variable has to come from somewhere you can define them, get them from the new row, or by a selectl.

You can't access them by writing tabl1.abc or table2.xyz

DROP TRIGGER IF EXISTS calcEGFR;
delimiter //
CREATE TRIGGER calcEGFR BEFORE INSERT ON Table2
FOR EACH ROW
BEGIN
DECLARE _age_at_visit INTEGER;
DECLARE _sex VARCHAR(10);
    SELECT age_at_visit, sex INTO _age_at_visit, _sex FROM Table1 WHERE (Table1.patient_wpid = NEW.patient_wpid AND Table1.patient_id = NEW.patient_id);
    SET @creatinine_power := POWER(NEW.creatinine,-1.154);
    SET @age_power :=  POWER(_age_at_visit,-0.203);
    IF _sex = 'female' THEN
        SET @sex_addition := 0.742;
    END IF;
    IF _sex = 'male' THEN
        SET @sex_addition := 1;
    END IF; 

    SET @eGFR_value := (175 * @creatinine_power * @age_power * @sex_addition);
    SET NEW.eGFR = @eGFR_value;
END;//
delimiter ;