Data is inserted by calling the insert method it expects the table name followed by an array of key and values to insert in to the database.
$data = [
'firstName' => 'Joe',
'lastnName' => 'Smith',
'email' => 'someone@domain.com'
];
$db->insert('users', $data);
The insert automatically returns the last inserted id by returning 'lastInsertId' to collect the id:
$id = $db->insert('users', $data);