Religious Oath - A sin?

Lets say you put your hands on the Bible (any religious text) and swewar onto God’s name something silly like you wont touch a certain product or something, or that will not affec anyone and has no purpose to be sworn upon, but then u break that oath, is that a sin in your opnion?

How about if i swore to myself but in the name of God that i would never touch a pencil again but i did. theres no harm if i do touch the pencil! would i be a sinner?

I read that you shouldnt swear upon any other name than Allah. I also read that if you make an oath and you break it, you should give expiation for it. Theres a section in hadith about it.