If you get a new passport, the eTA you received with your old passport is no longer valid.
Any time a passport is changed, you must reapply for travel authorization using the eTA process with your new passport details.
Thomas
Six months ago Thomas and his friends visited Quebec. For this trip he obtained his online travel authorization eTA online.
Months after Thomas’ return from Canada, his passport expired so Thomas had to renew it.
In two months, he will travel to Quebec again. Although his eTA is valid for 5 years, Thomas will have to fill in new eTA application which will contain the new passport number.