I'd start with the recording level in Audacity set to maximum (1.0). Then adjust your playback machine so that you are getting peaks between -6 and -3dB.
Put simply... If the level is too high you get distortion. If the level is too low, you get noise. (The same as when you record to an analog tape.)
The basic idea is to go "as loud as you can, without going over 0dB". 0dB is the absolute maximum for the analog-to-digital converter in your soundcard. If you overdrive your ADC, you'll get clipping (distorted flat-topped waves). Nothing bad happens when you get near 0dB, only if you "try" to go over. (Analog tape is somewhat different in that regard.)
With some soundcards, the recording level is set digitally after the ADC (at least that's the rumor). In that case, reducing the recording level in Audacity won't prevent clipping. You just end-up with a quieter distorted recording. Controlling the volume on the analog side (from your cassette player) is more reliable.
If your signal is too low, you'll get a worse signal-to-noise ratio. There is some noise on the analog-side of your soundcard, and there is some very-tiny digital quantization noise. That noise does not go down when you turn-down the analog level, so, if you record at a low level and boost the volume later, this noise gets boosted along with the signal. (Lower levels result in a lower signal-to-noise ratio.)
With a cassette, the biggest source of noise is (usually) the cassette itself. The recording level has no effect on that noise, since it goes up & down with the recording level. So in reality, you can probably record from a cassette at -12dB with no loss of quality. Pros routinely record in at -18dB with really good, low-noise, 24-bit equipment. But "at home", we usually need higher levels.
After recording, you can use the Amplify effect to bring the peaks up to 0dB. Amplify will also scan your file and set the degault gain for whatever is needed to get to 0dB. So, it's a good way to check your levels after recording (or after a test recording). For example, if Amplify defaults to +3dB, that means your peaks are currently hitting -3dB.
You should be connected to line-out (or headphone-out if you don't have line-out) on the cassette player.
And, you should be connected to line-in on your soundcard. If you have a laptop with only mic-in, you should get an external interface. (The Behringer UCA202 is usually the least expensive solution. Most USB soundcards are exactly like lapops with only mic-in and headphone-out.)
A line-level or headphone-level signal is about 100 times that of a microphone. A line-level signal will overload the mic input on most soundcards. APlus, the mic input is usually low-quality and often mono.