With today's washing machines and highly concentrated detergents, underwear is hygienically clean - even at 40 degrees.
Cotton can withstand higher temperatures (such as 60 degrees), but we rarely recommend 60 degrees due to wear and tear on the garments. If the cotton fabric is dyed, the color can, for example, wear off if you regularly wash at 60 degrees. In general, clothes will wear out faster in the wash if you regularly use 60 degrees.