Custom Module folder not showing

I installed ERPNext in production mode and then switched to develop mode.

After that, I made a custom module named ‘Test’, and after doing bench migrate, I cannot see a folder named ‘test’ in frappe-bench/apps/erpnext/erpnext

What do you mean by ‘custom module’, how do you created that custom module?

stop production mode :
cd frappe-bench
bench switch-to-develop (Optional : Will change your branches to the “develop” branch)
rm config/supervisor.conf
rm config/nginx.conf
sudo service nginx stop
sudo service supervisor stop
bench setup procfile
bench start
then use this
bench list-apps
to see what apps installed to your current site .
if not installed install it if installed bench migrate
sudo bench setup production frappe
if you are using vm - reboot the system
ps : you should make new doctype to that app - even if it’s dummy
and migrate

From the developer tab, I created a new Module Def.

Won’t sudo bench setup production frappe switch frappe to production mode?

yes it would switch back to production mode , since you was in the production mode at first i thought you want to show the module and go back to production again