Custom code works on all paid plans (except for the archived Creator plan). With a Free plan, you can see working code in Preview mode but not in a published project.
You can use Pinterest's widget builder to embed pinned content or boards in your project.
The Pinterest content you want to embed needs to be public.