Additional SQL Server features and topics not covered by specific categories
Few of the things are documented here database-engine-service-startup-options
-f starts SQL Server in minimal configuration mode and also in single user mode. Minimal configuration mode is used when due to some wrong configuration SQL Server is not able to start like wrongly placed tempdb, incorrect memory configuration. You can use minimal configuration to change the configuration parameters from sp_configure and then restart SQL Server.
-m as I know is mostly used when master database is not coming online which means SQL Server complete is not coming online. You use -m option to fix master corruption or change it location. There is not much difference between the use of both but internally there is.
-m startup options are documented here start-sql-server-in-single-user-mode
Additional reading overview-of-sql-server-startup-parameters-for-the-sql-database-engine-service
I do not have exhaustive list of difference between both neither MS has documented it. But i know when to use which startup option.