Assuming you have not changed the default, should be a file in your config folder next to your configuration.yaml file and named home-assistant_v2.db.
Reading through the posts I’m not entirely sure anyone clearly explained what actually happened to you so wanted to make sure you were aware. Your sdcard got corrupted because sdcards have a limited lifetime when it comes to writing data. If you use them as physical storage for an I/O intensive application they will eventually die and need to be replaced. HA is an I/O intensive application and because of that if you search for ‘sdcard corrupted’ you will see plenty of similar stories.
I tell you this because if you don’t change anything other then plugging in a new sdcard you should be aware that this will happen to you again eventually. The HA team has been making major improvements in DB size and performance so it may take longer this time but eventually it will happen.
@tom_l has published a great guide on how to extend the life of your sdcard by reducing some of the chattiness here that I would definitely recommend taking a look at.
Also boot from SSD support has recently been added to RPi4 so I would highly recommend looking into that. Using an SSD instead of an sdcard not only prevents this corruption issue it also should significantly improve performance in general. If you are in a supervised install now would be a really good time to look into that since you have to rebuild anyway. If you are using Home Assistant OS then I don’t think you can make this switch yet but I believe this issue is the one to follow for updates on that.