The current law in NY is that legal notices must be printed in a newspaper.
Below is a link to a resource which will give you more information. Several years ago a bill was introduced in the state legislature to eliminate the paper requirement and just do online. As legal notices are an important revenue source, newspapers oppose the legislation and it has not passed.
https://www.pnrc.net/2023/07/11/is-new-york-the-wild-west-of-public-notice/