EOMONTH
Date

Returns the serial number for the last day of the month that is the indicated number of months before or after start_date

Syntax:

=EOMONTH(start_date, months)

Example:

=EOMONTH("1/1/2023", 1)