One Piece: Brook is not technically immortal
One Piece: Brook Isn't Technically Immortal, But He's Very Hard To Kill

Brook is a member of Luffy's Straw Hat Pirates and is one of the newest additions to the crew. He is known as "Soul King" Brook and is actually an undead character. He is the team's musician and a skilled swordsman, making him one of the most interesting characters in the series. Regarding his powers and abilities, he consumed the Yomi Yomi no Mi, which allowed him to come back to life once after his death, which explains why he is still alive. But is he immortal?
Brook died a long time ago, but his Devil Fruit allowed him to come back to life.
Brook was a member of the Rumbar Pirates 48 years before the story begins. One day, while traveling in the West Blue, a lost baby whale began following their ship. Brook advised the captain to play it a song to cheer it up. The little whale was named Laboon after the crew realized the next day that it persisted in following them.
Many others later observed that Laboon was very fond of her. Brook and the Rumbar Pirates were worried that it would be too risky for a small whale like Laboon as they prepared to cross the Grand Line.
The crew tried in vain to convince him not to follow them further. Brook asked the rest of the crew to leave him alone with Laboon to talk some sense into him, but to no avail. Unsure of what to do for the time being, the Rumbar Pirates decided to ignore him from now on in the hopes that he would dissuade himself from following them. Their tactic seemed to be working, and Laboon did not appear in their sight for a while, but Laboon followed them in secret.
After three months of repairing their ship and singing, the Rumbar Pirates decided to entrust Laboon to Crocus's care, promising him that they would return after circumnavigating the globe in two or three years. By then, Laboon would be old enough to keep up with the crew. While sailing along the Grand Line, Brook and his companions faced various challenges.
One day, while traveling through a forest, the captain and half the crew contracted an incurable disease. To avoid spreading it to the other crew members, Yorki decided that he and the other sick people would attempt to escape the Grand Line by crossing into one of the quiet areas on board the ship.
Yorki announced his decision to Brook and the other crew members, regretting that he hadn't found another solution to protect the uninfected men. Knowing they wouldn't be able to return to Laboon, Yorki asked Brook to lead the team there and bid them farewell while playing their favorite song, "Binks Sake."
Along with the others, Brook continued to sail the new ship along the main line. Brook was offered a bounty after being chosen to lead the Rumbar Pirates as their new leader. The company entered the Florian Triangle two years after the captain took command, and there they were attacked by other pirates using poisoned arrows.
Brook and the survivors slowly died from the poison because their ship's doctor was killed during the battle. After consuming the Yomi Yomi no Mi, which allowed him to revive after death, Brook suggested his friends play an additional song. He then recorded it using a Tone Dial he had previously obtained from a merchant ship and promised to play it for Laboon.
The surviving Rumbar Pirates began to play their favorite song one last time, excited by the proposal. The pirates faded away throughout the joyful performance, smiling one by one, leaving the captain to play alone. Brook played the piano until his death, keeping in mind the promise he had made to Laboon. The search for Brook's ship and corpse was hampered by the dense fog of the Florian Triangle, so much so that it took a year to find him. Brook's soul, however, returned to the world of the living.
At this point, all that remained of his body was a pile of bones with hair. Having regained possession of his body, Brook collected the remains of his deceased companions and placed them below decks in coffins. For decades, Brook sailed alone, at the mercy of the sea currents, the rudder having been destroyed during the tragic siege. He also had his shadow stolen by Gecko Moria and even faced the zombie Ryuma, who nearly killed him for good, which is why Brook vowed to train to surpass Ryuma.
And that's the story of how Brook actually died. The Straw Hat Pirates later tracked him down and eventually agreed to join them, becoming the ninth member of Luffy's happy-go-lucky pirate crew (at first, he freaked everyone out, except for Luffy, because he was a living skeleton, but they got used to him). Now that we've explained that part, we can tell you whether or not he's immortal.
Brook isn't immortal per se, but he's very difficult to kill.
Brook is dead, as we've established, but he's also come back to life thanks to the Yomi Yomi no Mi. So, to answer the main question on your mind, we first need to talk about the Devil Fruit.
The Yomi Yomi no Mi is a Paramecia-type Devil Fruit that enhances the soul of those who consume it to the point that the user can return to life after their first death and use other abilities involving the use of the soul. Brook consumed it.
The fruit's selling point is that it allows its user to revive after death. In fact, shortly after its arrival, the soul retraces its steps and reenters the user's body, bringing the user back to life until their death. According to Brook, the soul remains in the earthly world because it constantly radiates powerful energy, becoming almost a material substance clearly visible to all. The user can make the soul leave the body and reach any location by passing through matter and overcoming any obstacle, including the Realm of Death.
Brook appears to have a skeletal face and is immersed in spiritual flames when in his ghostly form. The biggest drawback to this power is that when Brook separates his soul from his body, he is completely defenseless as he cannot use or move his physical body.
However, the owner of the Yomi Yomi cannot defeat the Homies if the soul they were created with is stronger than their own. This fruit has an advantage over Big Mom's Soru Soru no Mi in that it causes the Homies created by this fruit to faint, thus unleashing the power of the user's soul.
Brook can also harm intangible Homies, such as Zeus and Prometheus. However, if the user's corpse were damaged or decomposed, the returning soul would be forced to let the person live in that state. Furthermore, there is a possibility that the soul may never return to its body. Yomi Yomi's greatest weakness is that until you die the first time, the fruit grants no abilities; the only aspects this initially seems to imply are the weaknesses common to all Devil Fruits.
The extraordinary nature of the fruit is that it allows Brook to continue living in his skeletal state. Brook can perform any action common to any human being: he can see even though he has no eyes, eat and digest despite having no stomach, and speak despite having no vocal cords, tongue, or windpipe. After the time jump, during which he discovered the true nature of his fruit, Brook demonstrated that he could put the energy of his very soul into an object, such as in his Soul Solid, making an icy blade of hell, capable of freezing whatever it hits.
Having developed the ability to separate his soul from his body, Brook often uses these abilities to his advantage. The skeleton claims to have also used it to sneak peeks at women. Furthermore, if Brook's bones were to separate, his soul would intervene to return everything to normal, but only if they remained intact and were not broken. If they were destroyed, Brook would be unable to repair himself and would die, thus confirming that he is not immortal.