Both can outcompete the good guy stuff if nutrients either zero or high, or at least, we see more of this when waters unstable.
What’s levels run at normally?
If your into chemical removals (after nutrients stable) then you can eliminate cyano rather easy with a chemi clean treatment.
If anything remains, assume Dino’s, which is a longer process of removing manually daily, small hits of phyto every few days and if they can move into the water and off the sand, then UV works great when lights out.
Simply a numbers game cause Dino’s multiply fast.
Keep reducing their numbers and feed the system good guys, you’ll reach a point whereas those good guys , outcompete the bad and sand and rock stays clean.
Takes a bit of time (8 weeks for me) but they just disappeared on their own and have not returned.