Here's from https://spdx.dev/learn/handling-license-info/:
Why use SPDX IDs?
- Determine easily which licenses apply to a file
- Standardize licenses in source code, docs and others
- Eliminate error-prone parsing of license headers
- Decrease confusion by using the SPDX License List
Read more about why to use SPDX identifiers
How do SPDX IDs work?
In each file in your project, just add a single line in the following format, tailored to your license(s) and the comment style for that file’s language:
// SPDX-License-Identifier: MIT
/* SPDX-License-Identifier: MIT OR Apache-2.0 */
# SPDX-License-Identifier: GPL-2.0-or-later
Read more about how to use SPDX identifiers
Where are SPDX IDs used?
SPDX identifiers are being used in a growing number of open source projects (such as the Linux kernel), licensing guidelines (such as the FSFE‘s REUSE Software initiative), and license scanning tools.
Here's from https://spdx.dev/learn/handling-license-info/: