Authors can be readers too. Reviewing books in your own genre is not automatically wrong, but it can become risky when the review is tied to favors, competition, or promotion.
The question is whether the review looks independent.
When It Is Fine
If you bought and read a book because you are genuinely interested, a fair review can be normal reader behavior.
Keep the review focused on the book. Do not use it to promote your own work.
When It Gets Risky
Avoid reviewing direct competitors with the goal of lowering their rating. Avoid praise trades with other authors. Avoid reviewing books from a private group where everyone is expected to support each other.
Those patterns can look biased.
A Simple Rule
If you would be comfortable with readers knowing your connection to the author, the review is probably cleaner.
If the connection would look like a favor or a rivalry, skip it.