The price of online courses varies depending on the platform or institution that provides them. You can even study for free (it is called auditing a course), but keep in mind that, in this case, you might not earn a certificate and, most likely, will not receive feedback on your homework and designs.
The price of online UX design courses will also depend on the duration and depth of the program. Do not forget to check if the program you have chosen offers a refund in case you couldn't get a job offer in some time.