If using a Fluid Engine section, just pull the block full width, no extra code needed.
If using a Classic Editor section. Add this to your Custom CSS area, replacing #block-id with the #block-id of your Code Block.
/*
* Collection Carousel
* Full Width
*/
#block-id {
padding: 17px 0px;
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;
}