How to print YAML form in custom block under drupal 8
Install the module insert Block

Enable and configure the insert block text format in 'admin/config/content/formats' 

Make a new block with your form so that your form is available as a block.

In your accordion block you can call your form block with the special insert block tags [block:module=delta]. Make sure the 'insert block' text type is selected.