Clicking while pedaling
If the click is felt in both pedals the problem is likely to be the bottom bracket bearings.

You should be able to feel bearing stiffness, roughness or 'notchiness' be turning the crank manually. It helps if you can get the chain off the rings to do this so the crank turns freely. Also check for any play of the crank axle in the bearings.

If the crank axle is not turning smoothly in the bearings or there is excessive play you likely need a new cartridge bottom bracket unit. These are not expensive but require special tools to take off the cranks and extract/install a new BB unit.

It's a bit worrying that you are finding loose bolts all over your drive train. You should probably do a complete drive train checkup to make sure there are no other lurking problems.

The cranks bolts are of special concern. If the alloy crank arms come loose on the steel axle taper they can be terminally damaged in short order. The bolts can be removed (the crank will stay on the axle), the bolt and internal thread in the axle should be cleaned and de-greased then the bolts -re-installed with non-permanent thread locker (e.g., blue Loctite) and torqued to proper specification. (This will of course all get done if you replace your bottom bracket cartridge.)