Borrowed from Occitan bastir (“to build”), borrowed from Frankish *bastijan (“to sew, weave”).
Practice speaking and memorizing "bastir" and many other words and sentences in Spanish.