You can buy ISBNs through Bowker at myidentifiers.com
If you are going to have multiple books or multiple versions of your book (paperback, hardcover, ebook, or audiobook), we recommend buying a bundle. You don't need to use all the ISBNs at once, they never expire so you can use as-needed.
Note you do NOT need to purchase barcodes or QR codes! These can be made for free easily.
Every different "version" of your book needs a different ISBN, such as...
Paperback vs Hardcover
Different sizes (ex: 5x8 vs 6x9)
Print vs eBook vs Audiobook
Different editions, such as different cover art, content, etc.
If your book otherwise has the same format, size, page count, content, and cover, it can use the same ISBN across different distributors.
Many distributors (such as IngramSpark, Amazon KDP, etc) will offer a "free ISBN". The downside is that the ISBN can only be used through that distributor! You don't have control over that ISBN, and if you end up moving to a different distributor you are stuck needing a new ISBN and as such making your book not as easily found!