H1B status legal and H4 visa expired 6months back

I am currently on H1B Visa,legally eligible to stay in the USA upto 2024 but whereas H4 visa expired in July 2022 for spouse and kids and not requested for extension. My company has not been notified by me that my family came to the USA in Nov,2021. That is the reason the company hasn’t requested an H4 extension.

Would you please let me know what I have to do to bring them legal status.

You can hire your employer’s immigration lawyer to file H4 extension of status for your dependents using NPT, if approved USCIS will issue I-94 starting back dated from July 2022. If it is more than 180 days of illegal stay, I wpuld suggest leaving the country and go for H4 visa stamping and once visa is approved, travel back to the US.