Try the Ozlo sleep buds, from folks who didn't want Bose sleep buds to disappear:
https://ozlosleep.com/
Consider the sound Crimson Cloak for city masking. These are not cancelling, they are masking, but reasonably effective as well as portable.
As for the rest of your piece, if you don't want to spend too much, look to recording studio sound baffling and absorption for your room's sound reflective surfaces, or theater drapery for your windows and if you need more a canopy bed or hospital bed curtain tracks to enclose you in damping.
If you are willing to spend more, NYC and similarly dense cities (1 in 50 Americans live in NYC) have specialty home builders that can make music rooms, piano practice rooms, neighbor noise blocking rooms, etc., using box within a box construction techniques to separate your space from the spaces around you with sound dampening. (Think like vacuum bottle, but for acoustic waves instead of cold/heat.)
Here are many approaches between these paths:
https://www.soundproofwise.com/soundproof-walls/