Does table.insert replace values?

Hello, I am trying to replace a value in a table with another one and I’m not sure how, I know that you can use table.remove(), but the refrence says it moves all the other values one position down. It might be thst table.insert does replace the value, but I am having problems with it doing that(or my code is bad). I could use some help with this one. Thanks!

tbl[id] = new_value

table.insert() and table.remove() both shift things