Hey samathkm,
It sounds like you're having issues editing a contact on your iPhone. We can understand wanting to get that resolved. We want to help.
Are you part of a Family Sharing group, and if so, are you using Screen Time with any sort of communication limiting? If so, this could cause you to not be able to edit contacts. Learn a few other items that may be limited in this case in If you can’t create, import, edit, or delete contacts on iCloud.com. Make note that communication limits can be places on a variety of devices and OS versions, and those are all mentioned on this page.
Thanks!