Thanks for your question.
Standing surety for someone is not a sin. Defaulting on the surety, if it becomes due, is a sin.
Surety is only used once in the New Testament.
Hebrews 7:22 By so much was Jesus made a surety of a better testament.
Hebrews 7:22 Because of this oath, Jesus has become the guarantee of a better covenant.
In the Old Testament Judah became surety for the safe return of Benjamin from Egypt. From the narrative he was prepared to go through with the consequences.
Genesis 43:9 I will be surety for him; of my hand shalt thou require him: if I bring him not unto thee, and set him before thee, then let me bear the blame for ever:
Genesis 44:32,33 For thy servant becamesurety for the lad unto my father, saying, If I bring him not unto thee, then I shall bear the blame to my father for ever. Now therefore, I pray thee, let thy servant abide instead of the lad a bondman to my lord; and let the lad go up with his brethren.
Standing surety for someone, even a close friend is a risky thing to do and God through Solomon gives the following advice:
Proverbs 6:1-5 My son, if thou besurety for thy friend, if thou hast stricken thy hand with a stranger, thou art snared with the words of thy mouth, thou art taken with the words of thy mouth. Do this now, my son, and deliver thyself, when thou art come into the hand of thy friend; go, humble thyself, andmake sure thy friend. Give not sleep to thine eyes, nor slumber to thine eyelids. Deliver thyself as a roe from the hand of the hunter, and as a bird from the hand of the fowler.
Even a close friend can leave you ‘carrying the can’ so to speak. As for someone you don’t know very well, you will regret it.
Proverbs 11:15 He that is suretyfor a stranger shall smart for it: and he that hateth suretiship is sure.
It shows a lack of understanding of the nature of man.
Proverbs 17:18 A man void of understanding striketh hands, and becometh surety in the presence of his friend.
The final advice is - don’t do it.
Proverbs 22:26 Be not thou one of them that strike hands, or of them that are sureties for debts.
From my experience we do have to stand surety at times, particularly for our children. It is not sin to do it but we must be fully prepared and able to honour the debt if the one we are surety for defaults. If we become surety for a debt that we knowingly cannot pay - that is sin.
If you are interested in understanding the Bible, a Bible course is available onhttps://www.thisisyourbible.com.There is no charge. The sole aim of the course is to help you to understand the Bible. If you sign up you will be assigned, without cost, a personal tutor to guide you through the course and answer your questions.
I hope this helps