There isn't a specific command on Organ donation in the bible. It's something that is a more modern feat of medicine. The first organ to be successfully transplanted was a kidney in 1954. So wasn't something that needed directly addressing in bible times. But as with anything that isn't directly addressed in the bible, there are still principles in the bible that we can apply.
Rom 9:3 For I could wish that myself were accursed from Christ for my brethren, my kinsmen according to the flesh:
Now here Paul is speaking about being accursed from Christ in order that his people would be saved. He had such love for them that he was willing to go through being cursed for them in order for them to be saved.
John 10:11 I am the good shepherd: the good shepherd giveth his life for the sheep.
Christ was willing and did lay down His life for His sheep. As believers, our love is to be practical and do something to demonstrate that love. Primarily it's a Spiritual love, wanting to reach lost souls with the gospel. As if we help you live a longer life, we gain nothing, because we know that eternity is what really matters. Life here is short, but eternity is forever. But our love is also to be practical too.
Mark 9:41 For whosoever shall give you a cup of water to drink in my name, because ye belong to Christ, verily I say unto you, he shall not lose his reward.
We're to help and show love for others practically as well as spiritually, sometimes the practical demonstrates and shows people the love we have for their souls. But remember the order, as some get this wrong, the soul matters more than the body. If we do great social work, but not soul work, then we've just put off peoples judgement for a few more years, and made them a bit more comfortable in that time, but whats the point if they loose their soul.
Some may worry that their body parts have been given to another, what then would happen at the resurrection. But the Lord will be making a new body when we are raised again.
2 Corinthians 5:1 For we know that if our earthly house of this tabernacle were dissolved, we have a building of God, an house not made with hands, eternal in the heavens.
If our earthly tabernacle (or body) is dissolved, we have a building of God.
42 So also is the resurrection of the dead. It is sown in corruption; it is raised in incorruption. 43 It is sown in dishonour; it is raised in glory: it is sown in weakness; it is raised in power: 44 It is sown a natural body; it is raised a spiritual body. There is a natural body, and there is a spiritual body.
When we get our resurrection bodies, they aren't going to be exactly the same as the ones we had first time round. Believers who were burned at the stake will have a new body despite theirs being burned up. Believers who were eaten by lions in the Roman empire will have a new body, despite theirs being digested. People who were born with deformities or disabilities maybe some without a heart or other bodily organs will have a perfect and new body.
The Lord will make all things new for those who turn to Him.
One final principle is not to kill. This is clear form the 10 commandments. We aren't to kill others in order to get their organs. Don't try to speed up death, or try to use embryos and the stem cells from them, taking away their life in order to aid organ transplant.
Organ transplant has the greatest chance of success of succeeding when it hasn't been in a dead body for long. Just make sure that someone doesn't prioritise taking the organs from someone who is still alive and still has a chance of recovery in order to give the organs to someone else. With the modern medical equipment we have today, working out where that point is can be much harder, as the equipment can keep someone technically alive though they have no chance of recovery, so think it through and get good advice, but if the person is dead then there is no command against donating your organs for someone else in the bible.
Ezekiel 36:36 A new heart also will I give you, and a new spirit will I put within you: and I will take away the stony heart out of your flesh, and I will give you an heart of flesh.
I'm going to end with this. We all need a new heart, the one we have now is defective and dead. We need a new heart from God. But it's a spiritual heart we need. We need our who spiritual part of us to be brought to life, because it's dead. We cant just try to clean up the one that we have, it's dead, we need a completely new one. We need one given to us by God. If we come to Him for forgiveness, then He will take away our spiritual heart of stone and give us one thats of flesh. One that is alive and beats, and is able to worship and interact with God on a Spiritual level.