This is your problem. See What to do when the Mac App Store shows a different Apple ID for software updates https://www.macworld.com/article/3267709/mac-app-store-apple-id.html. This document refers to a prior owner (use the discussion in it this is your situation), but is also applies to cases where a current owner's old Apple ID is the problem. The discussion below relates to the second possibility.
Basically, If an app is purchased/downloaded using one Apple ID, then you can't update it with a second Apple ID. The app is inextricably linked to the first Apple ID. You'll have to delete it and purchase/download it again with the second Apple ID unless you set up family sharing (see below).
You can set up family sharing between the IDs to share purchases made with them. See:
Family Sharing https://support.apple.com/en-us/HT201060
Set up Family Sharing https://support.apple.com/en-us/HT201088