Display only connects to nintendo switch, not MacBook

I'm trying to use this display with my macbook (macbook air 2015) as a second display but it just never connects. I've tested the cable with another monitor too and the cable isn't the problem. Weirdly, when I connect my nintendo switch to it, it works perfectly.

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0