Модифицируем Ваш
div<div><p><span id="phone">+7 (915) 111 11 11</span> <br>Забронировал тариф</p></div>
подключаем js
function replacePhone()
{
let phone = '+7 (9xx) xxx xx xx';
let numberCount = phone.split('x').length;
for (let i = 1; i < numberCount; i++) {
phone = phone.replace('x', Math.round(-0.5 + Math.random() * 10));
}
let phonePlace = document.getElementById('phone');
if (phonePlace) {
phonePlace.innerText = phone;
}
setTimeout(replacePhone, 2000);
}
document.addEventListener('DOMContentLoaded', replacePhone);