A one-time decision that's worth getting right before you publish.
The direct answer
KDP offers a free ISBN for paperback and hardcover books (ebooks generally don't need one at all). Using it is genuinely free and simple, but it lists "Independently Published" as the publisher of record and locks that ISBN to Amazon only. Buying your own ISBN — in the US, through Bowker — makes you the publisher of record and lets you use that same ISBN to distribute through other retailers and library systems, but it costs money and is a permanent, one-time-use assignment.
Which one makes sense
The free option is reasonable if you're publishing exclusively through Amazon and don't need a personal or business imprint listed as publisher. Buying your own tends to matter more if you plan to distribute beyond Amazon (through IngramSpark, for instance), want a specific imprint name on the book, or are pursuing library or wider retail distribution. This is a decision worth making deliberately rather than defaulting to whichever option is presented first during KDP setup.