Sometimes, it is useful to use the WordPress nightly version on your local environment, to avoid problems with your code in the near future.
To install the WordPress Beta/Nightly version, you can download the zip file and install it. But it is easier to do it using the WP CLI. You only have to use this command:
wp core update --version=nightly Updating to version nightly (en_US)... Downloading update from https://wordpress.org/nightly-builds/wordpress-latest.zip... Unpacking the update... Success: WordPress updated successfully.
If you check the version, you can see the alpha version running:
wp core version 6.1-alpha-53873
You can add the update command to your cron if you want to have your local installation updated daily.