Hello and welcome to the forum. Thanks for your question but sorry you have this worry. Always best to get things checked out with your doctor and right now, many doctors are practicing telemedicine. They may be able to see your nail virtually and tell you if it has anything to do with melanoma. Typically, melanoma that involves a nail will look like a vertical line. This article is about subungual melanoma which is a special kind that involves nails. https://www.healthline.com/health/subungual-melanoma#symptoms
Trauma to the nail can also cause this. https://www.medicinenet.com/nail_discoloration/symptoms.htm
Your ob/gyn is a trained doctor. Are you still receiving prenatal care? This could be shown at that time and they can tell you if you need to follow up on it. We also have pregnancy forums that you may want to ask some questions in. https://www.medhelp.org/forums/Pregnancy/show/152
So, do run this by your doctor and let us know what they think.