What is the type of memory of a USB Flash drive and on a hard disc?
Spinning disks use magnetisation as storage media, like audio tapes. Minuscule grains of ferromagnetic materials are magnetised in different directions.

Solid-state disks (SSD) and USB flash drive use electrostatic storage. Pieces of a conductive material (polysilicon) placed inside an isolated container (SiO2, as Quartz, glass).
Using quantum mechanics magic, as "tunelling" or "hot electron injection", it is possible to charge and discharge these isolated elements ("gates") to write into the memory cell.

The electrostatic field is also able to modify the electric properties of nearby semiconductors by making them conductive ("field effect transistor")

All these element size is a few nanometers or tens of nanometers, bilionth division of a meter.