Your current implementation uses Bootstrap's "custom" form controls, but there are some mistakes in your markup. The correct way to create a custom checkbox in Bootstrap 4 is as follows:
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck1">
<label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
</div>
The appearance of the custom checkbox is controlled by the custom-*
CSS classes. By default, it uses Bootstrap's primary color, which is blue. If you want to change it to green, you can create your own custom CSS class. Here's an example with a new CSS class that allows you to switch between the default blue and the custom green color:
.custom-control-input-green:focus~.custom-control-label::before {
border-color: #28a745 !important;
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}
.custom-control-input-green:checked~.custom-control-label::before {
border-color: #28a745 !important;
background-color: #28a745 !important;
}
.custom-control-input-green:focus:not(:checked)~.custom-control-label::before {
border-color: #5bd778 !important;
}
.custom-control-input-green:not(:disabled):active~.custom-control-label::before {
background-color: #d6f5dd !important;
border-color: #d6f5dd !important;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="custom-control custom-checkbox custom-checkbox-green">
<input type="checkbox" class="custom-control-input custom-control-input-green" id="customCheck1">
<label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
</div>