If you need a peak/brim/visor, then a traditional cycling cap is really the best option. They generally have one panel of cloth that covers the scalp backward to the elastic at the rear. The parts above your ears are their own semicircular panel. These are also known as casquettes (from french) and not "caskets" which are to be avoided even though they sound similar.
Baseball caps are to be avoided - they tend to use 6 triangular panels sewn to a single point on the top, which is closed by a snap or permanent dome/rivet. These are uncomfortable and dangerous in a collision, and can interfere with MIPS sublayers functioning.
Finally, if you just want padding then look for a skull cap or a buff. Skull caps are close-fitting and may have a brow line that follows a normal hairline while dipping down to cover the ears.
A buff is essentially a shapeless tube of light/thin material with some elastic properties. Both should sit under a helmet without adding pressure spots.
Do be aware that your helmet will need to adjust outward to allow for the extra material between you and the sub-frame. Sweating will increase because ventilation decreases.
A final option is to stop shaving and allow some natural hair to grow back - this may not be a feasible solution for all readers.
The rear/sides of your neck are also exposed - some people like to use a "legionnaire" style of sun-shade around the back. This one is a cycling cap not a baseball cap.