Regarding SQL server agent not working

I am having SQL Server edition 2019 standard edition,when i start SQL server agent it get's stopped automatically after some amount time like 5-10 seconds,due to which i am able to run job scheduler.

Additionally, you may need to review the SQL Server Agent log:

It's separate from the SQL Server error log.

Typically SQL Server Agent won't start due to some kind of permission issue on the filesystem. You'll see messages to that effect in the SQL Agent log. These filesystem permissions would apply to the account used to run the SQL Agent service.

Verify you actually have Standard Edition - it appears that you may in fact have the Express Edition instead.