A short past history:
New Zealand and Afghanistan have never played a Test match against each other.
Afghanistan was admitted as a Full Member of the ICC in 2017. As they only became an ICC Full member in 2017, they cannot play an ODI with any other team and New Zealand is not their opponent.
The first time they played Afghanistan was at the 2018 Under-19 World Cup Qualifier, which was their first-ever international event, and New Zealand beat them easily by 8 wickets.