MDCG publishes tool to decide whether your software is a medical device.

https://ec.europa.eu/health/sites/health/files/md_sector/docs/md_mdcg_2021_mdsw_en.pdf