Or, by total dedication to the Lord (one gains samādhi)
Īsvara-pranidhānāt is a compound in fifth case singular. Here also (ref. Sūtra 1-23) the fifth case is used in the sense of cause or motive. The compound has two component words are īśvara and praṇidhāna. Īśvara is derived from the verb īś, to rule, to lord over, by adding the suffix vara making it a noun. The word thus means ruler, the best translation being ‘The Lord’. Praṇidhāna, formed from the verb dhā to place or fix, with prefixes pra and ni and the suffix ana means total dedication in this context. Etymologically it means ‘to fix with with definite certitude’.
The indeclinable vā simply implies an option. According to Patañjali, this method is not mandatory but just an alternate way for a seeker to achieve samādhi.