See the role of *.lock.json is to lock a particular version of a dependency listed in package.json and is downloaded in node_modules for your application so that next time you want to install dependencies in a new system/environment, your package manager downloads dependencies of same version as in *.lock.json instead of latest(major/minor) version possible listed in package.json
Whenever you use Yarn as your package manager(ie, invoke yarn commands in terminal), it creates yarn.lock.json and with npm (npm commands in terminal), it creates package.lock.json but if you use both, there is a likely chance that your dependency versions might conflict mainly because you might've used yarn and npm in different point in times. So always use one of the package managers but not both.
So to answer you question:
If you want to use yarn, delete package.lock.json and rely only on yarn.lock.json. Usually, there wouldn't be major version changes between those lock files otherwise one of the package managers would warn stating that their *.lock.json is not matching with dependencies downloaded in node_modules.