How do I do GPU rendering with enabled OptiX from the Command Line?
Thank you to everyone who helped!
I found a solution to the problem:
-b $filename -noaudio -E 'CYCLES' -s 20 -e 170 -a -F 'PNG' -- --cycles-device OPTIX  

Explanation:
-s 20 -e 170

Set the -s start frame to 20 and the -e end frame to 170.
-a

Render the whole animation using all the settings saved in the blend-file.
-- --cycles-device OPTIX

Override the device that is used to render frames.