If you supplied materials that were used to improve the owner's real property, go ahead and retain counsel to prepare and file your lien (and subsequent lawsuit to foreclose/collect).
You are correct that it will not prevent the issuance of a C/O, but it will prevent the owner from borrowing more money and/or selling the property during this time. It will also protect you from other creditors that might be out there (other suppliers or laborers) who might file their liens ahead of yours.
Retain local counsel right away. There are strict timelines you must meet in order to file a proper lien.
Disclaimer: (1) I may be guessing and/or not even licensed in your state; (2) We have not established an attorney-client relationship; (3) Sometimes you get what you pay for; and (4) If you want to send me a gift, my favorite color is orange.
You should definitely file a mechanic's lien. It will not stop a CO from being issued but it will inhibit the sale or financing of the property, which puts you in a very strong position. In addition, even if the property is not sold or financed in the near future, you can start a lawsuit to foreclose on the mechanic's lien. The time limit for filing a mechanic's lien on a private residential project in NY is four months. I am a few towns away from you. Feel free to contact me to help you with all this.
A mechanic's lien is a wonderful tool to secure payment but it is not the only tool and sometimes it is not the best tool. You should absolutely speak to a construction attorney right away because lien deadlines are very time sensitive. Remember the lien only provides you with a secured position, it does not, in and of itself, get you paid. To force payment you must foreclose on the property and enforce the lien.
The information provided herein is for informational purposes only and does not constitute legal advice. No attorney-client relationship is created by this answer. You should consult with a local attorney regarding your specific situation to obtain legal advice.