Commas are not necessary when writing the date in America, but they can be used for clarity. For example, July 4th, 2021 can also be written as July 4, 2021.