Enter multiple words in search bar to search one database field

I’m a newbie to coding, but overall I feel I’m doing fairly well. I feel like my issue should be super easy to solve or at least I should be ablet to find info on it, but I’ve had no luck. I have a search bar on my website that searches a database of images and works how I want it to IF I only enter one search word. The search bar is connected to a database field called ‘keywords’ where I have listed multiple words that describe the image. I’d like uses to be able to search multiple words and thus narrow the search a bit. Right now, if I put in multiple words, the search doesn’t render any results. My code is below. It uses contains() at the moment. I’ve tried eq() and hasAll(). I’ve tried placing a comma between the search words in the search bar. I’ve tried removing the commas between the works in my database field. As I said, it feels like this should be simple, but apparently for me it’s not. Any suggestions are greatly appreciated. Thanks!

$w(“#searchInput”).onKeyPress((e) => {
console.log(e.target.id + ‘-clicked’);
console.log('Pressed-Key: ', e.key);

    if (e.key === "Enter") {
        console.log('start search...');

        let keywords = $w('#searchInput').value
        
        wixData.query('MyGraphics').contains('keywords', keywords)
            .find()
            .then(results => {
                console.log('Results: ', results);

Found some code that’s workig as I want it to.

$w(“#searchInput”).onKeyPress((e) => {
console.log(e.target.id + ‘-clicked’);
console.log('Pressed-Key: ', e.key);

    if (e.key === "Enter") {
        console.log('start search...');

        let keywords = $w('#searchInput').value
        let str = keywords
        let array = str.split(" ")
        let query = wixData.query('MyGraphics')
        for (let i=0; i < array.length; i++) 
        {query = query.contains('keywords', array[i]); }
            query.find()
            .then(results => {
                console.log('Results: ', results);