Safaricom does not store sms logs in their system. Therefore, it is impossible to retrieve any sms message that you accidentally deleted. However, if it is an mpesa message, you can request mpesa statement to check the latest transactions that you made.
Solution 1: One trick that is known to recover deleted SMS message is to do a factory reset. All your text messages are likely to be restored. Beware that you may lose some data at the cost of the sms if you do a factory reset.
Solution 2: If you had been backing up your phone data to Google Drive, you can try to recover the latest SMS messages backup from Google Drive in the backup section.
Solution 3: Another solutions is to use data recovery desktop software or apps available online. Most of them require you to pay to use their recovery services. Therefore, if it is not something worth paying, avoid them at all cost.