custom field – changing an element or background of id div – different versions not working

In most themes anything added via the wp_head hook should appear after (and override) enqueued CSS.

So you could add an action to the themes functions.php and use get_queried_object_id() for the post ID.

function my_dynamic_css() {
  $custombg = get_post_meta( get_queried_object_id(), 'custombg', true );
  if (! empty($custombg)) {
   ?><style>#Box2 {background: <?php echo $custombg; ?> }</style>
  <?php
  }
}
add_action( 'wp_head', 'my_dynamic_css');

Presumably, rather than having the rest of your CSS in a PHP file you could enqueue it as a standard CSS file. If not you could “include” it by adding <link rel="stylesheet" href="https://wordpress.stackexchange.com/pathto/my/style1.css" /> to the above function or use heredoc.