Hi,
By default, all the valid routes in the BGP routing table will be advertised to the BGP peers. Although We can use filter-policy or route-policy to control the advertisement of BGP routes, routes cannot be advertised conditionally by checking link status.
I think a better way is to advertise routes to both ISPs. Then, Using the local-preference and MED attributes of BGP to control traffic to leave and enter the primary ISP first.
I hope this helps.