How to test for a named item in an item frame? (1.16.1)

NBT is your best friend here.

Detecting item frame position

Don’t try using the target selector arguments x, y, and z. These could have decimal parts and will definitely not work.

Instead, use the NBT tags TileX, TileY, and TileZ. These represent a block location and are integers.

/execute if entity @e[type=item_frame,nbt={TileX:12,TileY:23,TileZ:34}] run say Item frame in correct position.