postgresql – Inserting into multiple tables with a foreign compound key

I have these two table that I would like to insert alot of data into.

CREATE TABLE IF NOT EXISTS N
(
    id                      INT GENERATED ALWAYS AS IDENTITY,
    name varchar(50)
);

CREATE TABLE IF NOT EXISTS ConnectionProps
(
    connectionProp  INT,
    FK_n INTEGER,
    PRIMARY KEY (connectionProp,FK_n),
    CONSTRAINT FK_n
        FOREIGN KEY(id)
            REFERENCES N(id)
                ON DELETE CASCADE
);

I need to insert into both tables at the same time as the primary key of the connectionprops table is a compound key of the foreignkey of N and connectionProps. How do I do this?