It sounds like you may have a wash sale loss? There should be a code there that explains why the loss is disallowed. Please check your 1099-B and see if it gives any more explanation for why the loss is disallowed?
@mahe-thina
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"