Both NPM and Yarn are both package managers. Package Managers is essentially a way to automate the process of installing, upgrading, configuring or removing software.
Yarn was created by Facebook as an alternative to NPM ,and NPM is held by Microsoft.
from the point of technology both of them do the same, but for frameworks such as React,ReactNative which is maintaining by Facebook , of course they will do something to encourage users to start using their own package manager which is Yarn, of-course Yarn is the best fit for FaceBook-Maintaned framework.
I hope it helps