Contractions? I’m 39 weeks today

My stomach keeps getting really hard at the top and afterwards I get really intense rib pain and some period like cramps with pressure. I can’t feel anything when my stomach is hard and only know that it is because I’ve been resting all day due to baby not moving as much. I’m just not sure if they are contractions or not. This may also sound very stupid but how would I go about timing them without my hands being on my stomach??