Welcome the dilemma of getting a starter bike when you are not sure what kind of bike you want and don't know if you will actually like cycling or will keep it up. The problem of course is that you don't want to spend too much money on something you might end up not using.
The advantage of buying new is that you can go to all the local bike stores, get advice and test ride lots of different bikes. You can take your time choosing what you want and you'll be much more likely to get the bike that suits you in the size that fits you.
Buying used means paying less, but you have to know what you are looking for. If you don't know how to evaluate your fit on the bike you could end up with a bike that does not fit you well. You also need some idea of how to evaluate a bikes condition. A worn drivetrain can make the bike inefficient, badly adjusted derailleurs can make shifting gears a pain, and poorly adjusted brakes can be downright dangerous.
The other problem with used bikes is there are far fewer bikes to choose from at any given time. You have monitor spaces where used bikes are offered for sale (Craigslist and Facebook marketplaces seem to be the best options) and act on anything that does come up that matches what you want.
Many people in this community would recommend against buying a cheap bike from a big box store or department store (or anywhere that does not sell bicycles specifically). The lowest end bikes have the lowest quality components and hence the poorest shifting and braking, and weigh a ton. You will very like not get good size recomendations, and there is a chance the bikes are not assembled correctly.