index does not get used when there is "OR" in the query
In general PostgreSQL is capable of using an index in this situation.  It can scan the index two times and combine them with a BitmapOr.

The reason it cannot or has chosen not to do this in your particular case would depend on the particulars of your case, which you are not sharing with us.  Perhaps it just thinks the alternative plan will be cheaper.