What is the difference between renderPlain and renderRoot?
renderRoot() is for rendering the final result returned by a controller. renderPlain() is for rendering HTML which is not part of a page and is used for other purposes like emails. In your case the correct method would be render(), because this is the only render method which can bubble up metadata to the page. But you don't need to render at all, because you can put the unrendered form build array in a template variable and it will be rendered automatically when printed in TWIG.