Hi @Sunny , I'm sorry you're having this problem. This is a pretty common problem with a few documents/threads that can help you resolve it. From this SO thread:
"Claim names between user flow and custom policies are different, so here when it’s trying to verify the old password, the users identifier ends up being null. Use custom policies OR user flows, do not combine."
If you are using both, this may be the case. This Github thread should help with details.
Another thread here details a more complex issue that may be causing this.
Please review these documents and let me know if they help. If not I can help you further.
If this answer helped you please mark it as "Verified" so other users can reference it.
Thank you,
James