When you are making any changes related to Html, CSS, or js file & you are into the developer mode then you need to run the only below two commands:
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
These commands will generate your changes if it is not generating the changes it means there is some problem with the server in the file generation this is the old problem magento facing many times it is some times because of the cache also.
The alternative for this & when you are in the production mode is you can delete the
var/view_preprocessed/, var/composer_home/cache/, var/cache/, var/page_cache/, pub/static/frontend folders & then deploy the static content for that run the below command
rm -rf var/view_preprocessed/ var/composer_home/cache/ var/cache/ var/page_cache/ pub/static/frontend
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
If you are making the CSS changes & for that if you are writting the less files then you can run the grunt command for the compilation of the less to css & using it you don't need to run the above commands. You can refer this devdocs for it.
To know when to run which commands you can refer this answer Magento 2: When should I run which commands?