Generating frequency ?

I need 2 seperate sinewave signal sources, 20khz and 25khz.

Is it possible do this, with 2 analogue outputs.

Is there any example coding?

It might sound silly, and not too sure, but whilst the main program is running and doing other things, what happen to the 2 analogue outputs. Do they still keep oscillating??

I assume you cannot get a + and - sine wave, and only 5v peak (+-2.5v).

Or if a sinewave is not feasible, can I run 2 digital outputs.

The answers to your questions would depend entirely on what hardware platform you were thinking of using.

What will the output signals be used to?

Why not just create two sine wave oscillators and gate them on and off using your Arduino?

There answer could be yes, but only a few models of Arduino have 2 analog outputs.

For example, Uno and Mega have no analog outputs.

Initially I was going to use ESP32-S3-WROOM1 N16R8 but I have on order MEGA 2560 R3.

I thought Mega had AIO ??

The 2 signals will power up 2 seperate ultrasonic transmitters.

No. The mega has only analog input (a multiplexed ADC) but not DAC

Neither boards have analog outputs.

(Earlier ESP32 chips had analog outputs (DACs) but the S3 does not, it seems)

In my old hardwired discrete logic circuits, thats what I have ( 2 seperate sinewave oscillators each switched on by a mosfet).

But I am wanting to modernise the system by using Arduino

The Mega has only digital outputs. Timers can be used to generate 20 kHz and 25kHz digital signals on different pins, which are fine for driving ultrasonic transducers.

Without checking up, so no Arduino has any analalogue outputs.

Have a look at AD9850/51 wave generators or the AD9833

Check up instead of guessing. There exist a few Arduinos with a DAC (analog) output.

Naturally, you will also want to check if the DAC can generate a sine wave signal of the desired frequency and quality, if you believe that a sine wave is important.

It would appear that if the board has PWM this can be used with RC filters to get a sinewave.

But I think thats getting outside of my comfort zone. Maybe I have got to learn. Or just revert back to switching the power supply to existing oscillators.

agree with @robtillaart use a DDS signal generator module

I have used the AD9833 with a ESP32 without problems

have a look at programing-for-pure-sine-wave-inverter

Yes that can be done. But many arduinos are not fast enough to do this. You would need something like 250 kHz pwm to get a nice sine wave...
The counters simply run not fast enough to do that with a bit depth of 8 bit...
No idea how fast the esp32 counters can go...

If you want do your own experiments with DDS, ATmega with R-2R ladder can produce quite nice and smooth sine wave but 8-bit max. I'm not sure about ESP32, probably cannot avoid some jittering in the signal, but I am not an expert in ESP32 field. ATmega has an advantage that it is able to disable all interrupts so the output signal will be complete without any jittering. It is fast enough to produce 25kHz, even more. Years ago I did some experiments with ATmega1284P and the result was really impressive.

Some inspiration:
https://scienceprog.com/avr-dds-signal-generator-v20/

Ok. Looking at their datasheets enables more precise suggestions.

Why do you think you need a sine wave?

If so, of what quality?