I was having unsuccessful attempts to format a flash drive using the built-in “Disk Utility” app. I came across this discussion and it solves my problem. So here’s note for myself and others are welcome to use the same as well.

diskutil list
diskutil eraseDisk free EMPTY /dev/disk4
diskutil eraseDisk ExFAT USB64 /dev/disk4

It works!