Advanced Custom Fields plugin – get text from editor field and save it in a variable

the_field() is a echo statement use get_field() instead.

You can’t save echoed value into a variable, for that you may need to use output buffer ob_start.In your case get_field function should work.