Tracing automated texts

So ever since my wife got her new number she has been receiving random text messages from different numbers about 5-10 times a day. They’re basically advertising texts addressed to the previous person who had her number. She really does not want to change her number either. I recently thought about seeing if there is a way to backtrace the number to a possible server or something that will allow me to shut the messages down somehow. If anyone can think anything please let me know. Much appreciated thank you. -Sam