how to tag BGP peer prefixes and forward only those to another peer?

But the short answer to your question - “where do I put the rule to match this community?”…
Untitled3.png
This is where you would put the community match requirement. Any rule with that value set will only match prefixes which have the community xxxx:yyyy (communities have to be numbers, which is why the screenshot has the red warning text color).

In a nutshell, all fields in “Matchers” and in “BGP” must be true, in order for the Actions and BGP Actions to be done.