You need a paid membership to Nintendo Switch Online to play course world in Super Mario Maker 2. Pretty sure you could access course world at no extra cost in the original
The Nintendo Switch's Paid Online Service Sounds Downright Bizarre
Nintendo Switch will have a paid online service starting this fall - Polygon
Nintendo Switch Online - Nintendo - Official Site
Nintendo announces new paid online service for Switch | Ars Technica