<?php
$sidebar = get_field('sidebar'); // or whatever your field is named
if (is_active_sidebar($sidebar)) {
dynamic_sidebar($sidebar);
}
?>
you should take a look at this https://codex.wordpress.org/Function_Reference/dynamic_sidebar. There are many ways to code the sidebar and you may need additional html code. I’d suggest looking at some of the 20XX themes to see how they do it.