how to create a year ID generate

I need to generate an employee id for eg: 2022 in the beginning, the number should be auto incremented, and it should be 2022000125(year is 2022).It should again start from year and the date created in the last. How i suppose to my change the sequence number generation ? can someone help me. Thank you in Advance.

//creating employeeid
    $numbers = '';
    foreach (range($i = 0; $i < 10; $i++){
        $numbers .= $i;
    }
    $employee_id =substr(str_shuffle($numbers), 0, 9);