I have battled both over the last decade, and my comments will generally follow other members. First as noted, you are dealing with two issues, though they are similar with respect to the causes.
First the cyano as it is easiest. Cyanobacteria is caused by organics in the presence of light. Prevention is easy once you get the tank's biological system "cleaned up." Weekly substantial water changes (50-70% once each week), cleaning into all open areas of the substrate (organics accumulate in the substrate and are essential for a healthy biological system and they provide plant nutrients but they need to be kept in check), keeping the filter well rinsed, not overfeeding, not overstocking (too many fish, and/or too large fish), and controlling light (tank lighting and ambient room light). Use the watre changer to really move the grains of substrate aroound where the cyano is and it should float free, then it can be easily sucked out. Loosen all of it, allow it to settle down on the substrate, then it easily vacuums out.
Black brush/beard algae is caused by an imbalance of light/nutrients. Light may be too intense (bright), or not intense enough for the plants to use, or the wrong spectrum, or on for too long each 24-hour period. All of these "light" aspects must then be balanced with adequat nutrients for the plants to use the light, but not more. This algae on rock and wood is OK, provided it does not spread/is not spreading to plant leaves as that can in time suffocate the leaf and then the plant.