on both command, you didn't give any option about bitrate or quality target, so the implementation may freely choose those. if you see output near the end, nvidia give quality of 19 while libx265 give 36, so the size would be different wildly.