To be thinking of something repeatedly over a period of time; to have something at the front of the mind. I know dinner is hours away, but I just have food on the brain—so do you want pizza or maybe Chinese?
have something on the brain
be obsessed with something. informal
have somebody/something on the ˈbrain
(informal) think and/or talk a lot or too much about somebody/something: You do nothing but talk about your job; you’ve got work on the brain!
have something on the brain
tv. to be obsessed with something. (Have got can replace have.) I have money on the brain, I guess.