First create a new folder and load it into Visual Studio. Start a terminal and create a new npm-project.

> npm init
package.json:
{
   "name": "Bootstrap",
   "version": "1.0.0",
   "description": "Custom Bootstrap 5.0 Theme",
   "main": "index.js",
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"
   },
   "author": "Syncment",
   "license": "ISC"
 }

Get a fresh Bootstrap instance by running the next command in your terminal.

> npm install bootstrap@next node-sass

Create the next folder structure into your project and create a new “custom.scss” file into the scss folder.
Copy the “bootstrap.bundle.min.js” from “\node_modules\bootstrap\dist\js” and the “jquery.min.js” file from “\node_modules\jquery\dist

<your project>
   - assets
      - css
      - js
         - bootstrap.bundle.min.js
         - jquery.min.js
   - scss
      - custom.scss

Open up your “package.json” file and edit the “scripts” block.

{
  "name": "Bootstrap",
  "version": "1.0.0",
  "description": "Bootstrap",
  "main": "index.js",
  "scripts": {
    "build": "node-sass --include-path node_modules --output-style compressed --source-map true --source-map-contents true --precision 6 scss -o assets/css/"
  },
  "author": "Syncment",
  "license": "ISC",
  "dependencies": {
    "bootstrap": "^5.0.0-beta3"
  }
}

See: Sass · Bootstrap v5.0 (getbootstrap.com)
Open up your new “custom.scss” and edit it as followed.

/* Load required bootstrap
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@import "bootstrap/scss/functions";

//=======================================================================================
// Default variable overrides

/* Theme Colors
–––––––––––––––––––––––––––––––––––––––––––––––––– */
$primary:       #312062;
$secondary:     #faf5ee;
$success:       #d8eacc;
$info:          #c5dbf2;
$warning:       #fbeeca;
$danger:        #F6ABB6;
$light:         #f5f5f5;
$dark:          #2B303B;

/* Brand Colors
–––––––––––––––––––––––––––––––––––––––––––––––––– */
$brand-background: #faf5ee;
$brand-foreground: #312062;
$brand-accent_1:   #305a7f;
$brand-accent_2:   #2f949c;
$brand-accent_3:   #2fceba;
$brand-accent_4:   #97cace;

/* Load required bootstrap
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@import "bootstrap/scss/variables";
@import "bootstrap/scss/mixins";
@import "bootstrap/scss/utilities";

//=======================================================================================
// Bootstrap and its default variables

/* Options
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Spacing
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Body
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Links
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Paragraphs
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Grid
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Container
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Components
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Typography
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Tables
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Header
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Navbar
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Buttons
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Forms
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Lists
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Code
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Spacing
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Alert
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Toasts
–––––––––––––––––––––––––––––––––––––––––––––––––– */

//=======================================================================================

/* Load bootstrap layout & components 
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@import "bootstrap/scss/root";
@import "bootstrap/scss/reboot";
@import "bootstrap/scss/type";
@import "bootstrap/scss/images";
@import "bootstrap/scss/containers";
@import "bootstrap/scss/grid";
@import "bootstrap/scss/tables";
@import "bootstrap/scss/forms";
@import "bootstrap/scss/buttons";
@import "bootstrap/scss/transitions";
@import "bootstrap/scss/dropdown";
//@import "bootstrap/scss/button-group";
@import "bootstrap/scss/nav";
@import "bootstrap/scss/navbar";
//@import "bootstrap/scss/card";
//@import "bootstrap/scss/accordion";
@import "bootstrap/scss/breadcrumb";
@import "bootstrap/scss/pagination";
//@import "bootstrap/scss/badge";
@import "bootstrap/scss/alert";
//@import "bootstrap/scss/progress";
//@import "bootstrap/scss/list-group";
@import "bootstrap/scss/close";
@import "bootstrap/scss/toasts";
//@import "bootstrap/scss/modal";
//@import "bootstrap/scss/tooltip";
//@import "bootstrap/scss/popover";
//@import "bootstrap/scss/carousel";
//@import "bootstrap/scss/spinners";

/* Load bootstrap helpers & utilities 
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@import "bootstrap/scss/helpers";
@import "bootstrap/scss/utilities/api";

//=======================================================================================
// Custom styles

/* Grid
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Container
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Typography
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Links
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Header
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Navbar
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Buttons
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Forms
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Lists
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Code
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Tables
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Spacing
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Alert
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Footer
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Utilities
–––––––––––––––––––––––––––––––––––––––––––––––––– */

In the custom.scss you can declare Boostrap Sass variables for editing your theme. You will find the complete list of Bootstrap’s variables in “\node_modules\bootstrap\scss_variables.scss“. Copy and paste variables as needed, modify their values, and remove the !default flag. If a variable has already been assigned, then it won’t be re-assigned by the default values in Bootstrap.

Finally you can build your Bootstrap Theme by running “npm run build” into the terminal. All files are located in your assets directory.