I am wondering if the SQL jobs like automating the database backup runs even the machine/server is offline?
No but you can create a script or a cron job that can take a copy of the files:
Such files are stored under
C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA and are the actual database.
So if you take a copy of those two files and zip them together we can say that you took a backup of the database.
Try to bring those two files on another machine and attach them to test if ti works ;)