Is this an Intel Mac or an M1 Mac?
While booted to the macOS installer, did you launch Disk Utility and erase the SSD? If so, then your data has been destroyed. If you did not erase the SSD with Disk Utility, then your data may still be on the SSD. If you are in doubt, then boot into a macOS installer using Recovery Mode (Command + R), or Internet Recovery Mode (Command + Option + R), or create and use a bootable macOS USB installer.
If you have an Intel Mac, then while booted to the installer launch Disk Utility and select "Show All Devices" so that the physical drive appears on the left pane of Disk Utility. Select the physical SSD from the left pane ("Apple SSD....") and erase it as GUID partition and MacOS Extended (Journaled) or if you are installing macOS 10.15+, then erase it as GUID partition and APFS (top option). Your data has now been destroyed.
If you an have M1 Mac, then follow the directions to erase the drive found within the Apple articles for Recovery Mode and Internet Recovery Mode.
Edit: If you did not use Disk Utility to erase the drive and instead just installed macOS over top of itself (or perhaps even beside itself), then your data is still likely on the SSD.