How do you create a custom Gutenberg block?

Custom Gutenberg blocks extend editor capabilities with reusable components. Using JavaScript and React, developers register blocks using registerBlockType in a JavaScript file. Blocks can include settings for attributes and styles, allowing custom content layouts or functionalities within the WordPress editor.